SockJs heartbeat causes deadlock with XHR polling [SPR-14833] #19399
When using XHR polling as a transport for SockJs, a deadlock can occur when one thread is sending a message at the same time the heartbeat run.
Stack from thread sending a message :
Heartbeat task :
Looking at the code, there seem to be two locks : heartbeatLock in AbstractSockJsSession and responseLock in AbstractHttpSockJsSession. When calling sendMessage(), the lock order is responseLock then heartbeatLock. For the HeartbeatTask, the lock order is heartbeatLock then responseLock.
Affects: 4.2.8, 4.3.3
Backported to: 4.2.9
The text was updated successfully, but these errors were encountered: