Let's do that *after* we've checked sochan for nullity.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5871 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2009-07-13 02:12:57 +00:00
parent 0cf6b6199e
commit 31eda1cfc9
@@ -1136,12 +1136,12 @@ 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);
}
if (sochan.isConnectionPending()) {
return false; // not ready to write to this connection yet
}
// write all we can of our partial buffer
int wrote = sochan.write(_partial);