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:
@@ -486,6 +486,12 @@ public class BlockingCommunicator extends Communicator
|
||||
// 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 {
|
||||
int size = _fin.available();
|
||||
DownstreamMessage msg = (DownstreamMessage)_oin.readObject();
|
||||
|
||||
Reference in New Issue
Block a user