code: function(packet) {
      if (packet && packet.peek() === 0xff) {
        //can receive unexpected error packet from server/proxy
        //to inform that connection is closed (usually by timeout)
        let err = packet.readError(info);
        if (
          err.fatal &&
          (_status !== Status.CLOSING && _status !== Status.CLOSED)
        ) {
          this.emit('error', err);
          this.end();
        }
      } else if (_status !== Status.CLOSING && _status !== Status.CLOSED) {
        this.emit(
          'error',
          Errors.createError(
            'receiving packet from server without active commands\n' +
              'conn:' +
              (info.threadId ? info.threadId : -1) +
              '(' +
              packet.pos +
              ',' +
              packet.end +
              ')\n' +
              Utils.log(opts, packet.buf, packet.pos, packet.end),
            true,
            info,
            '08S01',
            Errors.ER_UNEXPECTED_PACKET
          )
        );
        this.destroy();
      }
    }
docs: Handle packet when no packet is expected.
  (there can be an ERROR packet send by server/proxy to inform that connection is ending).
  
  @param packet  packet
  @private