mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2024-12-14 11:26:25 +00:00
fix crash on invalid udp tracker response
This commit is contained in:
parent
7ea2a138d3
commit
b5d8748db4
@ -82,6 +82,7 @@ UDPTracker.prototype._request = function (opts) {
|
||||
var socket = dgram.createSocket('udp4')
|
||||
|
||||
var cleanup = function () {
|
||||
if (!socket) return
|
||||
self._cleanupFns.splice(self._cleanupFns.indexOf(cleanup), 1)
|
||||
if (timeout) {
|
||||
clearTimeout(timeout)
|
||||
|
Loading…
Reference in New Issue
Block a user