code: func (c *Client) die(event LogEvent, err error) error {
  	// log error
  	c.backend.Log(event, c, nil, nil, err)
  
  	// close connection
  	_ = c.conn.Close()
  
  	// ensure tomb is killed
  	c.tomb.Kill(err)
  
  	return err
  }
docs: /* error handling and logging */
  // used for closing and cleaning up from internal goroutines