daemon: Trivial debug message cleanup.
Check that a message header was received before trying to log it.
This commit is contained in:
parent
29c31aad9a
commit
dfc4b2b9a2
1 changed files with 1 additions and 1 deletions
|
@ -203,7 +203,7 @@ class CoreRequestHandler(SocketServer.BaseRequestHandler):
|
|||
'''
|
||||
try:
|
||||
msghdr = self.request.recv(coreapi.CoreMessage.hdrsiz)
|
||||
if self.debug:
|
||||
if self.debug and len(msghdr) > 0:
|
||||
self.info("received message header:\n%s" % hexdump(msghdr))
|
||||
except Exception, e:
|
||||
raise IOError, "error receiving header (%s)" % e
|
||||
|
|
Loading…
Reference in a new issue