def close(self):
        if not self.closed and getattr(self, '_state_event', None):
            try:
                # gevent>=1.0
                self._state_event.stop()
            except __HOLE__:
                # gevent<1.0
                self._state_event.cancel()
        super(Socket, self).close()
dataset/ETHPy150Open 0rpc/zerorpc-python/zerorpc/gevent_zmq.py/Socket.close