Submitted On 29-APR-1998
sbhide
we too have this problem with jdk1.1.3 running
on solaris 2.6. does this have a side effect on the
threads that were started by the program who called
accept ?
Submitted On 09-MAY-1998
jsirota
It's a Solaris 2.6 OS bug, #4043763. I've seen
sevreral workarounds, but calling Thread.stop()
on the accepting thread doesn't seem to work either.
Same behavior in JDK1.1.5 and JDK1.1.6.
Submitted On 27-MAY-1998
mrahman
We have the smae problem. We would REALLY like a workaround.
Simply exiting the program without closing the socket is
a poor solution at best.
Submitted On 20-JUN-1998
kW
I suppose this to be bug 4096914
Submitted On 20-JUN-1998
kW
I could think of workaround:
use ServerSocket.setSoTimeout(1) to produce
a java.io.InterruptedIOException
Submitted On 31-JUL-1998
gberche
Other workaround:
To make your listening thread be active again:
1. Set a state variable to tell it is in a stopping state (see
java.lang.Thread.stop() discussion)
2. Create a dummy socket and connect it to the port you're listening on to make
accept() call return and have your listening thread be active.
It's not great, but I found it easier to implement that the timeout
Submitted On 07-APR-1999
nielsG
I have the same problem on Windows`95 (not NT). I can't ServerSocketObj.close()
after I stopped the thread which was doing ServerSocketObj.accept();
Submitted On 05-SEP-2000
burner
I have the same problem with Windows NT with
java version "1.2.2"
Classic VM (build JDK-1.2.2_006, native threads, symcjit)
close() certainly should trigger an exception in the accept() method. The workaround is to use set
SO_TIMEOUT, which is less than perfect.
Submitted On 23-OCT-2001
venci75
I had the same problem.
The workaround was to try to create a client socket
connetion to the server socket before trying to close it.
In this case the accept() method returns...
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|