mirror of
https://github.com/status-im/react-native-udp.git
synced 2025-01-12 10:04:21 +00:00
Changed process.nextTick to setImmediate when socket already closed
This commit is contained in:
parent
69a8e844e3
commit
00f1224167
@ -112,7 +112,7 @@ UdpSocket.prototype.bind = function(port, address, callback) {
|
||||
|
||||
UdpSocket.prototype.close = function (callback=noop) {
|
||||
if (this._destroyed) {
|
||||
return process.nextTick(callback)
|
||||
return setImmediate(callback)
|
||||
}
|
||||
|
||||
this.once('close', callback)
|
||||
|
Loading…
x
Reference in New Issue
Block a user