Correct callback erroring when message can't be decoded

This commit is contained in:
Tyler Hobbs
2013-07-18 15:27:16 -05:00
parent acd9ad7f61
commit d3273107d2

View File

@@ -165,7 +165,8 @@ class Connection(object):
except Exception, exc:
log.exception("Error decoding response from Cassandra. "
"opcode: %04x; message contents: %r" % (opcode, body))
callback(exc)
if callback:
callback(exc)
self.defunct(exc)
return