code: func (cli *Client) handleErrorAndDisconn(err error) {
  	// Lock for reading.
  	cli.muConn.RLock()
  
  	// Ignore the error and end the process
  	// if the Network Connection has already
  	// been disconnected.
  	if cli.conn == nil || cli.conn.disconnected {
  		// Unlock.
  		cli.muConn.RUnlock()
  
  		return
  	}
  
  	// Unlock.
  	cli.muConn.RUnlock()
  
  	// Handle the error.
  	if cli.errorHandler != nil {
  		cli.errorHandler(err)
  	}
  
  	// Send a disconnect signal to the goroutine
  	// via the channel if possible.
  	select {
  	case cli.disconnc <- struct{}{}:
  	default:
  	}
  }
docs: // handleError handles the error and disconnects
  // the Network Connection.