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:
Michael Bayne
2009-07-13 02:12:24 +00:00
parent 231edfa66e
commit 0cf6b6199e
@@ -1136,6 +1136,9 @@ public class ConnectionManager extends LoopingThread
if (_partial != null) {
// if our outgoing channel is gone or closed, then bail immediately
SocketChannel sochan = conn.getChannel();
if (sochan.isConnectionPending()) {
return false; // not ready to write to this connection yet
}
if (sochan == null || (!sochan.isConnected() && !sochan.isConnectionPending())) {
throw new IOException("Connection unavailable for overflow write " + sochan);
}