Skip to content

Commit

Permalink
Merge pull request #153 from subdir/patch-1
Browse files Browse the repository at this point in the history
NPE on mysql disconnect
  • Loading branch information
shyiko authored Feb 21, 2017
2 parents 6c44bac + 32df79d commit ae090b4
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,9 @@ private void listenForEventPackets() throws IOException {
event = eventDeserializer.nextEvent(packetLength == MAX_PACKET_LENGTH ?
new ByteArrayInputStream(readPacketSplitInChunks(inputStream, packetLength - 1)) :
inputStream);
if (event == null) {
throw new EOFException();
}
} catch (Exception e) {
Throwable cause = e instanceof EventDataDeserializationException ? e.getCause() : e;
if (cause instanceof EOFException || cause instanceof SocketException) {
Expand Down

0 comments on commit ae090b4

Please sign in to comment.