Fix for NPE in closing datagram channel.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5896 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2009-08-04 19:41:01 +00:00
parent 5099dc9d96
commit 4dc85174ba
@@ -336,11 +336,14 @@ public class BlockingCommunicator extends Communicator
{ {
// clear out our writer reference // clear out our writer reference
_datagramWriter = null; _datagramWriter = null;
log.debug("Datagram writer thread exited.");
if (_datagramReader == null) {
closeDatagramChannel(); closeDatagramChannel();
} }
log.debug("Datagram writer thread exited.");
}
/** /**
* Closes the datagram channel. * Closes the datagram channel.
*/ */