Instead of NPEing when we reset _oin at a bad time, let's throw an exception we can better handle and reduce some log spew.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6150 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Mike Thomas
2010-09-09 17:35:44 +00:00
parent 83e5576be0
commit ba0ba7f659
@@ -486,6 +486,12 @@ public class BlockingCommunicator extends Communicator
// noop! // noop!
} }
if (_oin == null) {
// Our object input stream was taken away from us before we could do anything with the
// frame, this is equivalent to being interrupted mid-frame, so indicate that.
throw new InterruptedIOException();
}
try { try {
int size = _fin.available(); int size = _fin.available();
DownstreamMessage msg = (DownstreamMessage)_oin.readObject(); DownstreamMessage msg = (DownstreamMessage)_oin.readObject();