code: def close_socket(self):
          '''Closes the socket and resets the channel.'''
          log.debug("Closing socket")
          if self.sock:
              try:
                  self.sock.close()
              except:
                  pass
  
              self.sock = Nonf close_socket(self):
          '''Closes the socket and resets the channel.'''
          log.debug("Closing socket")
          if self.sock:
              try:
                  self.sock.close()
              except:
                  pass
  
              self.sock = None
docs: Closes the socket and resets the channel.