This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Socket's close() doesn't close connection (old bug?)


In my eager to reproduce another bug I've stumbled across yet another strange issue - namely that Socket's close() doesn't close underlying socket (with no traffic), nor "wake up" a blocked read-thread (as a consequence)...

Blah blah blah, this turned out to be reported already:


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15430

Unfortunately still open ;-)

It seems that if you set the SoTimeout value, so that read() returns, the socket will be closed after returning the blocking thread.
So I guess it's only a matter of interrupting any blocking thread when close() is invoked - then everything will be good?!


(My naive thoughts - I'll look into the implementation in a moment to see if this is possible in any easy matter...)

// Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]