Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues

Bug 947

Summary: Invalid disconnect logic on bad connection
Product: JacORB Reporter: Erik Englund <englundGiant>
Component: ORBAssignee: Mailinglist to track bugs <jacorb-bugs>
Status: RESOLVED FIXED    
Severity: major CC: jacorb
Priority: P2    
Version: 3.1   
Hardware: PC   
OS: Linux   

Description Erik Englund 2013-04-24 20:18:50 UTC
If I have a connection attempting to be made to a bad object the client connection will remain in the waitforconnect state forever.  If I turn on the following properties:
jacorb.connection.server.timeout=5000 
jacorb.client.pending_reply_timeout=5000 jacorb.connection.client.idle.timeout=5000 

it catches the bad connection however, the logic in the disconnect call seems flawed.  

Line 1460:
if (disconnectAfterNonRecoverableSystemException) {
            return;
}

Since the default value is 'true', this will abort the disconnect of a bad connection.  This leaves the thread in the waitforconnect state forever, even though I set a timeout.

Shouldn't the logic be:
if (!disconnectAfterNonRecoverableSystemException) {
            return;
}


With this change and the above properties the Client connections are successfully closed and the thread pool no longer continues to grow.
Comment 1 Nick Cross 2013-06-16 13:50:00 UTC
Pull request https://github.com/JacORB/JacORB/pull/52 done.
Comment 2 Nick Cross 2013-06-16 16:54:39 UTC
Merged.