Commits

Denis Bilenko committed ac2cd9c

gevent.socket.socket: add 'closed' property

  • Participants
  • Parent commits 99880b2

Comments (0)

Files changed (1)

         self.hub.cancel_wait(self._write_event, cancel_wait_ex)
         self._sock = _closedsocket()
 
+    @property
+    def closed(self):
+        return isinstance(self._sock, _closedsocket)
+
     def connect(self, address):
         if self.timeout == 0.0:
             return self._sock.connect(address)