code: function onError (err) {
      self.client.emit('warning', new Error('Connection error: ' + err.message))
      peer.destroy()
    }
docs: Handle peer 'error' events that are fired *before* the peer is emitted in a 'peer' event.