diff --git a/src/ca/tcpiiu.cpp b/src/ca/tcpiiu.cpp index 1a12235de..f95bf01d3 100644 --- a/src/ca/tcpiiu.cpp +++ b/src/ca/tcpiiu.cpp @@ -266,9 +266,12 @@ extern "C" void cacRecvThreadTCP ( void *pParam ) piiu->busyStateDetected = false; } piiu->unacknowledgedSendBytes = 0u; - // reschedule connection activity watchdog - piiu->recvDog.messageArrivalNotify (); } + // reschedule connection activity watchdog + // but dont hold the lock for fear of deadlocking + // because cancel is blocking for the completion + // of the recvDog expire which takes the lock + piiu->recvDog.messageArrivalNotify (); // wake up recv thread only if // 1) there are currently no bytes in the queue