8199329: Remove code that attempts to read bytes after connection reset reported

Reviewed-by: redestad, clanger, chegar
This commit is contained in:
Alan Bateman 2018-03-15 11:02:22 +00:00
parent 3a7f72200c
commit fc927f60c3
4 changed files with 17 additions and 85 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -38,8 +38,7 @@ import java.nio.channels.FileChannel;
* @author Jonathan Payne
* @author Arthur van Hoff
*/
class SocketOutputStream extends FileOutputStream
{
class SocketOutputStream extends FileOutputStream {
static {
init();
}
@ -111,7 +110,7 @@ class SocketOutputStream extends FileOutputStream
socketWrite0(fd, b, off, len);
} catch (SocketException se) {
if (se instanceof sun.net.ConnectionResetException) {
impl.setConnectionResetPending();
impl.setConnectionReset();
se = new SocketException("Connection reset");
}
if (impl.isClosedOrPending()) {