Protect sendHeartbeat from cancellation
Issue: SPR-14564
This commit is contained in:
0
change.diff
Normal file
0
change.diff
Normal file
@@ -252,6 +252,10 @@ public abstract class AbstractSockJsSession implements SockJsSession {
|
||||
if (isActive()) {
|
||||
if (heartbeatLock.tryLock()) {
|
||||
try {
|
||||
if (this.heartbeatTask == null) {
|
||||
// Cancelled while waiting to acquire the lock
|
||||
return;
|
||||
}
|
||||
writeFrame(SockJsFrame.heartbeatFrame());
|
||||
scheduleHeartbeat();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user