diff options
author | Martin Odersky <odersky@gmail.com> | 2006-06-27 15:27:12 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2006-06-27 15:27:12 +0000 |
commit | 972ecebb2794655b543fde5c8a4f75614729ce5c (patch) | |
tree | 185a9cdad776cd2bda468f79797ff362fa22e006 /src/compiler/scala/tools/nsc/CompileSocket.scala | |
parent | 5a17c91819ebeca83dcdfcfb1dc49e1bc7322a87 (diff) | |
download | scala-972ecebb2794655b543fde5c8a4f75614729ce5c.tar.gz scala-972ecebb2794655b543fde5c8a4f75614729ce5c.tar.bz2 scala-972ecebb2794655b543fde5c8a4f75614729ce5c.zip |
Fixed bugs 633, 637, 639, 640
Diffstat (limited to 'src/compiler/scala/tools/nsc/CompileSocket.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/CompileSocket.scala | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/CompileSocket.scala b/src/compiler/scala/tools/nsc/CompileSocket.scala index 32683d9029..5549cf18b7 100644 --- a/src/compiler/scala/tools/nsc/CompileSocket.scala +++ b/src/compiler/scala/tools/nsc/CompileSocket.scala @@ -99,6 +99,7 @@ object CompileSocket { def deletePort(port: int): unit = portFile(port).delete() def getOrCreateSocket(vmArgs: String): Socket = { + val nAttempts = 9; def getsock(attempts: int): Socket = if (attempts == 0) { System.err.println("unable to establish connection to server; exiting"); @@ -114,10 +115,13 @@ object CompileSocket { System.err.println("...connection attempt to server at port "+port+" failed; re-trying...") if (attempts % 2 == 0) portFile(port).delete() Thread.sleep(100) - getsock(attempts - 1) + val result = getsock(attempts - 1) + if (attempts == nAttempts) + System.err.println("... connection established at port "+port) + result } } - getsock(9) + getsock(nAttempts) } def getSocket(serverAdr: String): Socket = { |