code: func (c *Client) Disconnect() {
  	// Nothing to do if already disconnected or running in HTTP POST mode.
  	if !c.doDisconnect() {
  		return
  	}
  
  	c.requestLock.Lock()
  	defer c.requestLock.Unlock()
  
  	// When operating without auto reconnect, send errors to any pending
  	// requests and shutdown the client.
  	if c.config.DisableAutoReconnect {
  		for e := c.requestList.Front(); e != nil; e = e.Next() {
  			req := e.Value.(*jsonRequest)
  			req.responseChan <- &response{
  				result: nil,
  				err:    ErrClientDisconnect,
  			}
  		}
  		c.removeAllRequests()
  		c.doShutdown()
  	}
  }
docs: // Disconnect disconnects the current websocket associated with the client.  The
  // connection will automatically be re-established unless the client was
  // created with the DisableAutoReconnect flag.
  //
  // This function has no effect when the client is running in HTTP POST mode.