feross/bittorrent-dht — pull request #24 by alexanderGugel (2014-07-08 02:15:58+00:00)
Title: Fix bug: Trying to convert undefined to string

Fix bug when trying to convert malformed message.y (undefined) to string.

/Users/alexander/trrnts/node_modules/bittorrent-dht/client.js:533
var type = message.y.toString()
^
TypeError: Cannot call method 'toString' of undefined
at DHT._onData (/Users/alexander/trrnts/node_modules/bittorrent-dht/client.js:533:24)
at Socket.EventEmitter.emit (events.js:98:17)
at UDP.onMessage (dgram.js:440:8)