code: func (c *conn) handleFrame(message *messageEvent, ok bool) (*messageEvent, error) {
  	if !ok { // The channel has been closed
  		return nil, io.EOF
  	} else if message == nil {
  		// See onClose for the explanation about sending a nil item.
  		close(c.ch)
  		return nil, io.EOF
  	}
  
  	return message, nil
  }
docs: // handleFrame handles a single frame received from the channel. This is a
  // convenience funciton to dedupe code for the multiple deadline cases.