mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8278326: Socket close is not thread safe and other cleanup
Reviewed-by: jpai
This commit is contained in:
parent
036c80844e
commit
4b573343a6
5 changed files with 835 additions and 232 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2023, 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
|
||||
|
@ -124,8 +124,8 @@ import java.util.Set;
|
|||
// close the original socket impl and release its descriptor
|
||||
close();
|
||||
|
||||
// update the Sockets impl to the impl from the http Socket
|
||||
SocketImpl si = httpSocket.impl;
|
||||
// change Socket to use httpSocket's SocketImpl
|
||||
SocketImpl si = httpSocket.impl();
|
||||
socket.setImpl(si);
|
||||
|
||||
// best effort is made to try and reset options previously set
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue