private boolean isIgnorableException(Throwable throwable) { // There really does not seem to be a better way of detecting this kind of exception return throwable instanceof IOException && throwable.getMessage().equals("Connection reset by peer"); }