Skip to content

Commit

Permalink
ThroughputTest: Catch ClosedChannelException and ignore if necessary
Browse files Browse the repository at this point in the history
Seen when emulating Linux on s390x, which may be very slow.
  • Loading branch information
kohlschuetter committed Feb 14, 2024
1 parent 5c1ec41 commit b923dad
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit b923dad

Please sign in to comment.