def METHOD_NAME(self) -> None:
    if self.socket:
        try:
            self.socket.setsockopt(zmq.LINGER, 0)
            self.socket.close()
        except:
            pass
    if self.pollin:
        try:
            self.pollin.unregister(self.socket)
        except:
            pass