[jcifs] Infinite loop of error messages
Michael B Allen
mba2000 at ioplex.com
Tue Oct 3 17:03:08 GMT 2006
Actually from looking at the code I'm not sure it's an error for
disconnect() to be called while in state 2 (run connected). I
think I would just consider this to be not connected and modify
jcifs.util.transport.Transport.java:disconnect() to be like:
193 public void disconnect( boolean hard ) throws IOException {
194 synchronized(setupDiscoLock) {
195 synchronized(this) {
196 switch (state) {
197 case 0: /* not connected - just return */
198 case 2:
199 return;
Meaning add 'case 2:' so that if it's in state 2 it just ignores the
disconnect() call since the transport isn't connected.
Or, it might be better to do something like this:
193 public void disconnect( boolean hard ) throws IOException {
194 synchronized(setupDiscoLock) {
195 synchronized(this) {
196 switch (state) {
197 case 0: /* not connected - just return */
198 return;
199 case 2:
200 hard = true;
201 case 3: /* connected - go ahead and disconnect */
Since the transport isn't really connected it should have any sessions
open or anything. We can just do the disconnect routine but set hard =
true to give it a quick action.
Actually I would try the second change first.
Mike
On Tue, 03 Oct 2006 12:15:43 -0400
Stéphane Bond <stephane.bond at crim.ca> wrote:
> We just have exactly the same problem with jcifs 1.2.9 on a portal server.
>
> The logs are filled by this stack trace until the disk is full :
>
> jcifs.util.transport.TransportException: Invalid state: 2
> at jcifs.util.transport.Transport.disconnect(Transport.java:209)
> at jcifs.util.transport.Transport.loop(Transport.java:126)
> at jcifs.util.transport.Transport.run(Transport.java:248)
> at java.lang.Thread.run(Thread.java:595)
>
> Stephane
>
>
>
--
Michael B Allen
PHP Active Directory SSO
http://www.ioplex.com/
More information about the jcifs
mailing list