logo       

Interrupted connect: msg#00058

network.samba.java

Subject: Interrupted connect

Hi everyone,

I found a bug in jcifs.util.transport.Transport. If the thread executing Transport.connect() is interrupted all following connect() calls fail with a TransportException "Invalid state: 1".

The reason for this is that the state isn't reset by the InterruptedException handler.

The attached patch fixes this problem.


Bye,

Thomas
--- jcifs\util\transport\Transport.java Fri Nov 18 16:21:24 2005
+++ ..\..\jcifs_1.2.6\src\jcifs\util\transport\Transport.java Wed Nov 23
13:13:33 2005
@@ -167,6 +167,8 @@
try {
thread.wait( timeout ); /* wait for doConnect */
} catch( InterruptedException ie ) {
+ state = 0;
+ thread = null;
throw new TransportException( ie );
}

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise