Skip to content
Snippets Groups Projects
Closed stem.socket.ControlSocket.is_alive() should check if socket is open explicitly
  • View options
  • stem.socket.ControlSocket.is_alive() should check if socket is open explicitly

  • View options
  • Closed Issue created by Sathyanarayanan Gunasekaran

    "Checks if the socket is known to be closed. We won't be aware if it is until we either use it or have explicitily shut it down." Instead of this we should do a sample query and if we get a SocketError, then return a False.

    
    def is_alive(self):
      try:
        self.send("GETINFO version")
       except SocketError:
         self._is_alive = False
      return self._is_alive
    

    Linked items ... 0

  • Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading