diff options
author | JanHolger <jan@bebendorf.eu> | 2021-12-01 18:21:56 +0100 |
---|---|---|
committer | JanHolger <jan@bebendorf.eu> | 2021-12-01 18:21:56 +0100 |
commit | e3f9330af263fba206c5901a5a23a26b9da52142 (patch) | |
tree | dfcff5d6fc7d90a08ccb5ed383b392beda5bc2f7 /src/main | |
parent | 1a93ceffb3510c7000ed46ed9ba211f4db70f0ae (diff) |
Added proper handling of SocketException's
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/lumaserv/bgp/BGPSession.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/main/java/com/lumaserv/bgp/BGPSession.java b/src/main/java/com/lumaserv/bgp/BGPSession.java index 669010b..3ffadd8 100644 --- a/src/main/java/com/lumaserv/bgp/BGPSession.java +++ b/src/main/java/com/lumaserv/bgp/BGPSession.java @@ -52,15 +52,11 @@ public class BGPSession implements Runnable { public void run() { try { while (!closed) { - try { - handle(BGPPacket.read(inputStream)); - } catch (SocketException ignored) { - closed = true; - configuration.getListener().onClose(this); - } + handle(BGPPacket.read(inputStream)); } } catch (IOException ex) { - ex.printStackTrace(); + closed = true; + configuration.getListener().onClose(this); } } |