Skip to content

Commit

Permalink
Fix deadlock on some jdks between write and close by synchronizing sh…
Browse files Browse the repository at this point in the history
…utdown using the sendMutex_ already used for send
  • Loading branch information
djencks committed May 26, 2015
1 parent d33611d commit 7ddcd03
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -288,8 +288,12 @@ public void execShutdown() {

//
// shutdown the transport
// synchronization on sendMutex_ is needed to avoid a deadlock in some oracle and ibm jdks between send and shutdown
// https://bugs.openjdk.java.net/browse/JDK-8013809 deadlock in SSLSocketImpl between between write and close
//
transport_.shutdown();
synchronized (sendMutex_) {
transport_.shutdown();
}

//
// Shutdown the receiver threads. There may not be a receiver
Expand Down

0 comments on commit 7ddcd03

Please sign in to comment.