Fixed bug which caused PyBLIP to stop sending responses while the connection was closing.
authormorrowa
Fri Jul 03 17:50:28 2009 -0700 (2009-07-03)
changeset 586577813acf12
parent 57 998dcacd4983
child 59 46c7844cb592
Fixed bug which caused PyBLIP to stop sending responses while the connection was closing.
Python/BLIP.py
     1.1 --- a/Python/BLIP.py	Thu Jul 02 20:45:11 2009 -0700
     1.2 +++ b/Python/BLIP.py	Fri Jul 03 17:50:28 2009 -0700
     1.3 @@ -140,7 +140,7 @@
     1.4      
     1.5      @property
     1.6      def isOpen(self):
     1.7 -        return self.status==kOpening or self.status==kOpen
     1.8 +        return self.status==kOpening or self.status==kOpen or self.status==kClosing
     1.9      
    1.10      @property
    1.11      def canSend(self):
    1.12 @@ -290,6 +290,8 @@
    1.13                      self._dispatchMetaRequest(msg)
    1.14                  else:
    1.15                      self.onRequest(msg)
    1.16 +                    if not msg.response.sent:
    1.17 +                        log.error("**** Request received, but a response was never sent! Request: %r", msg)
    1.18          except Exception, x:
    1.19              log.error("Exception handling incoming message: %s", traceback.format_exc())
    1.20              #FIX: Send an error reply