From a8b4ef4f67039a79e8cd6b62085583becff3f688 Mon Sep 17 00:00:00 2001 From: "tgoff0@gmail.com" Date: Wed, 21 Jan 2015 21:37:48 +0000 Subject: [PATCH] daemon: Trivial debug message cleanup. Check that a message header was received before trying to log it. --- trunk/daemon/sbin/core-daemon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trunk/daemon/sbin/core-daemon b/trunk/daemon/sbin/core-daemon index 258d51f7..733f619c 100755 --- a/trunk/daemon/sbin/core-daemon +++ b/trunk/daemon/sbin/core-daemon @@ -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