original_docstring:  Close a connection and restore it to the pool
  
          :param conn: a rexpro connection that was pull from the Pool
          :type conn: RexProConnection
          :param soft: define whether to soft-close the connection or hard-close the socket
          :type soft: bool
          
docstring: Close a connection and restore it to the pool
docstring_tokens: Close a connection and restore it to the pool
code: def close_connection(self, conn, soft=False):
          """ Close a connection and restore it to the pool
  
          :param conn: a rexpro connection that was pull from the Pool
          :type conn: RexProConnection
          :param soft: define whether to soft-close the connection or hard-close the socket
          :type soft: bool
          """
          if conn._opened:
              conn.close(soft=soft)
          self.put(conn)
code_tokens: def close_connection ( self , conn , soft = False ) : if conn . _opened : conn . close ( soft = soft ) self . put ( conn )
short_docstring: Close a connection and restore it to the pool
short_docstring_tokens: Close a connection and restore it to the pool
comment: """ Close a connection and restore it to the pool
  
          :param conn: a rexpro connection that was pull from the Pool
          :type conn: RexProConnection
          :param soft: define whether to soft-close the connection or hard-close the socket
          :type soft: bool
          """