GeezerVison is showing github.com — Forward port 5.0: Decrease Long allocations and map.put calls in Refe… · netty/netty@8d35a85
File tree
Expand file treeCollapse file tree
Open diff view settings
handler/src/main/java/io/netty/handler/ssl
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -419,6 +419,9 @@ public List<byte[]> getStatusResponses() { |
419 | 419 | // object so we need to retain a reference to the parent context. |
420 | 420 | parentContext = context; |
421 | 421 |
|
| 422 | + // Adding the OpenSslEngine to the OpenSslEngineMap so it can be used in the AbstractCertificateVerifier. |
| 423 | + engines.put(ssl, this); |
| 424 | + |
422 | 425 | // Only create the leak after everything else was executed and so ensure we don't produce a false-positive for |
423 | 426 | // the ResourceLeakDetector. |
424 | 427 | leak = leakDetection ? leakDetector.track(this) : null; |
@@ -1968,9 +1971,6 @@ private SSLEngineResult.HandshakeStatus handshake() throws SSLException { |
1968 | 1971 | return handshakeException(); |
1969 | 1972 | } |
1970 | 1973 |
|
1971 | | - // Adding the OpenSslEngine to the OpenSslEngineMap so it can be used in the AbstractCertificateVerifier. |
1972 | | - engines.put(sslPointer(), this); |
1973 | | - |
1974 | 1974 | if (!sessionSet) { |
1975 | 1975 | if (!parentContext.sessionContext().setSessionFromCache(ssl, session, getPeerHost(), getPeerPort())) { |
1976 | 1976 | // The session was not reused via the cache. Call prepareHandshake() to ensure we remove all previous |
|