code: func (cli *Client) handlePUBREL(p packet.Packet) error {
  	// Lock for update.
  	cli.muSess.Lock()
  
  	// Unlock.
  	defer cli.muSess.Unlock()
  
  	// Extract the Packet Identifier of the Packet.
  	id := p.(*packet.PUBREL).PacketID
  
  	// Validate the Packet Identifier.
  	if err := cli.validatePacketID(cli.sess.receivingPackets, id, packet.TypePUBLISH); err != nil {
  		return err
  	}
  
  	// Get the Packet from the Session.
  	publish := cli.sess.receivingPackets[id].(*packet.PUBLISH)
  
  	// Lock for reading.
  	cli.muConn.RLock()
  
  	// Handle the Application Message.
  	cli.handleMessage(publish.TopicName, publish.Message)
  
  	// Unlock.
  	cli.muConn.RUnlock()
  
  	// Delete the Packet from the Session
  	delete(cli.sess.receivingPackets, id)
  
  	// Create a PUBCOMP Packet.
  	pubcomp, err := packet.NewPUBCOMP(&packet.PUBCOMPOptions{
  		PacketID: id,
  	})
  	if err != nil {
  		return err
  	}
  
  	// Send the Packet to the Server.
  	cli.conn.send <- pubcomp
  
  	return nil
  }
docs: // handlePUBREL handles the PUBREL Packet.