If we have no socket or a closed socket when trying to write overflow queue

messages, treat that like a network failure which will clear out that queue and
shutdown the connection. Overflow queues are only meant to handle sockets that
are backed up, not closed or non-existent.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5813 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2009-06-02 22:59:23 +00:00
parent 52795a8664
commit 1e6c35f9c1
@@ -1121,8 +1121,8 @@ public class ConnectionManager extends LoopingThread
if (_partial != null) {
// if our outgoing channel is still not ready, then bail immediately
SocketChannel sochan = conn.getChannel();
if (!sochan.isConnected()) {
return false;
if (sochan == null || !sochan.isConnected()) {
throw new IOException("Connection unavailable for overflow write");
}
// write all we can of our partial buffer