--- a/src/java.base/share/classes/java/net/AbstractPlainSocketImpl.java Wed Feb 13 08:29:35 2019 +0000
+++ b/src/java.base/share/classes/java/net/AbstractPlainSocketImpl.java Wed Feb 13 14:43:25 2019 +0000
@@ -753,12 +753,19 @@
assert fd.valid() && localport != 0 && address != null && port != 0;
AbstractPlainSocketImpl psi = (AbstractPlainSocketImpl) si;
+
+ // copy fields
psi.stream = this.stream;
psi.fd = this.fd;
- psi.closePending = false;
psi.localport = this.localport;
psi.address = this.address;
psi.port = this.port;
+
+ // reset fields; do not reset timeout
+ psi.closePending = false;
+ psi.connectionReset = false;
+ psi.shut_rd = false;
+ psi.shut_wr = false;
} else {
throw new RuntimeException("not implemented");
}