Fix server hang when a connection to the server is denied. Remove explicit calls to cancel.
| | |
| | | if (clientConnection.getConnectionID() < 0) |
| | | { |
| | | // The connection will have already been closed. |
| | | key.cancel(); |
| | | iterator.remove(); |
| | | continue; |
| | | } |
| | |
| | | clientConnection.getClientHostPort(), |
| | | clientConnection.getServerHostPort()); |
| | | |
| | | key.cancel(); |
| | | iterator.remove(); |
| | | continue; |
| | | } |
| | |
| | | clientConnection.getClientHostPort(), |
| | | clientConnection.getServerHostPort()); |
| | | |
| | | key.cancel(); |
| | | iterator.remove(); |
| | | continue; |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | key.cancel(); |
| | | iterator.remove(); |
| | | continue; |
| | | } |
| | |
| | | sendRejectionNotice, message, |
| | | msgID); |
| | | |
| | | key.cancel(); |
| | | iterator.remove(); |
| | | continue; |
| | | } |