Browse Source

Handled socket exceptions correctly

proto
Thomas Johnson 2 years ago
parent
commit
6a6da90d21
  1. 5
      proto/ProtoIn.java

5
proto/ProtoIn.java

@ -2,6 +2,7 @@ package proto;
import java.io.DataInputStream;
import java.io.EOFException;
import java.net.SocketException;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.stream.IntStream;
@ -99,6 +100,10 @@ public class ProtoIn
t.start();
}
} catch (EOFException e)
{
this.loop = false;
handler.handleClose();
} catch (SocketException e)
{
this.loop = false;
handler.handleClose();

Loading…
Cancel
Save