try closing the socket instead of the streams;

this is also what happens in a try-with-resource

Change-Id: I53686c84f69149173e1894d0b9b3d26778c55b08
This commit is contained in:
Axel Uhl committed 2019-01-23 11:14:28 +01:00
1 parent dbf33e1693
commit 6a2552a3fa
1 file changed
+1 -2
@@ -374,8 +374,7 @@ public abstract class AbstractServerReplicationTestSetUp<ReplicableInterface ext
logger.info("received STOP request");
}
}
pw.close(); // important: close this first, so response is delivered
inputStream.close(); // this may let a client-side read() terminate abnormally with a SocketException
pw.flush(); // ensure response is delivered
s.close();
logger.info("Request handled successfully.");
}