Don't try writing overflow messages for an outgoing connection that is still
waiting to connect. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5870 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1136,6 +1136,9 @@ public class ConnectionManager extends LoopingThread
|
|||||||
if (_partial != null) {
|
if (_partial != null) {
|
||||||
// if our outgoing channel is gone or closed, then bail immediately
|
// if our outgoing channel is gone or closed, then bail immediately
|
||||||
SocketChannel sochan = conn.getChannel();
|
SocketChannel sochan = conn.getChannel();
|
||||||
|
if (sochan.isConnectionPending()) {
|
||||||
|
return false; // not ready to write to this connection yet
|
||||||
|
}
|
||||||
if (sochan == null || (!sochan.isConnected() && !sochan.isConnectionPending())) {
|
if (sochan == null || (!sochan.isConnected() && !sochan.isConnectionPending())) {
|
||||||
throw new IOException("Connection unavailable for overflow write " + sochan);
|
throw new IOException("Connection unavailable for overflow write " + sochan);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user