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:
@@ -1121,8 +1121,8 @@ public class ConnectionManager extends LoopingThread
|
|||||||
if (_partial != null) {
|
if (_partial != null) {
|
||||||
// if our outgoing channel is still not ready, then bail immediately
|
// if our outgoing channel is still not ready, then bail immediately
|
||||||
SocketChannel sochan = conn.getChannel();
|
SocketChannel sochan = conn.getChannel();
|
||||||
if (!sochan.isConnected()) {
|
if (sochan == null || !sochan.isConnected()) {
|
||||||
return false;
|
throw new IOException("Connection unavailable for overflow write");
|
||||||
}
|
}
|
||||||
|
|
||||||
// write all we can of our partial buffer
|
// write all we can of our partial buffer
|
||||||
|
|||||||
Reference in New Issue
Block a user