Commit 33a9204a authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[3074] Add logging

parent 2115ed0b
......@@ -525,7 +525,9 @@ class MsgQ:
# Append it to buffer (but check the data go away)
if fileno in self.sendbuffs:
(last_sent, buff) = self.sendbuffs[fileno]
if now - last_sent > 0.1:
tdelta = now - last_sent
if tdelta > 0.1:
logger.error(MSGQ_SOCKET_TIMEOUT_ERROR, fileno, tdelta)
self.kill_socket(fileno, sock)
return False
buff += msg
......
......@@ -142,3 +142,9 @@ data structure.
% MSGQ_SUBS_NEW_TARGET Creating new target for subscription to group '%1' for instance '%2'
Debug message. Creating a new subscription. Also creating a new data structure
to hold it.
% MSGQ_SOCKET_TIMEOUT_ERROR Killing socket %1 because timeout exceeded (%2)
Outgoing data was queued up on a socket connected to msgq, but the other
side is not reading it. It could be deadlocked, or may not be monitoring
it. Both cases are programming errors and should be corrected. The socket
is closed on the msgq side.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment