code: func (c *client) close() {
  	Logger.Printf("client %d close()", c.Numero)
  	close(c.closing)
  
  	// stop reading from client
  	c.rwc.SetReadDeadline(time.Now().Add(time.Millisecond))
  	Logger.Printf("client %d close() - stop reading from client", c.Numero)
  
  	// signals to all currently running request processor to stop
  	c.mutex.Lock()
  	for messageID, request := range c.requestList {
  		Logger.Printf("Client %d close() - sent abandon signal to request[messageID = %d]", c.Numero, messageID)
  		go request.Abandon()
  	}
  	c.mutex.Unlock()
  	Logger.Printf("client %d close() - Abandon signal sent to processors", c.Numero)
  
  	c.wg.Wait()      // wait for all current running request processor to end
  	close(c.chanOut) // No more message will be sent to client, close chanOUT
  	Logger.Printf("client [%d] request processors ended", c.Numero)
  
  	<-c.writeDone // Wait for the last message sent to be written
  	c.rwc.Close() // close client connection
  	Logger.Printf("client [%d] connection closed", c.Numero)
  
  	c.srv.wg.Done() // signal to server that client shutdown is ok
  }
docs: // close closes client,
  // * stop reading from client
  // * signals to all currently running request processor to stop
  // * wait for all request processor to end
  // * close client connection
  // * signal to server that client shutdown is ok