diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java index eb9f8034f..86f2fbbb7 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java @@ -259,7 +259,7 @@ protected void acceptAndHandleConnection() throws IOException { sc.write(bb); bb.clear(); } - } catch (SocketException | SocketTimeoutException e) { + } catch (SocketException | ClosedChannelException | SocketTimeoutException e) { if (keepRunning.get()) { throw e; } else { @@ -599,7 +599,7 @@ public void run() { int written; try { written = dc.write(sendBuffer); - } catch (SocketException e) { + } catch (SocketException | ClosedChannelException | SocketTimeoutException e) { if (keepRunning.get()) { throw e; } else {