mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-09-28 13:21:30 +02:00
Bind to a random udp port (Fixes #71)
This commit is contained in:
parent
94815a247d
commit
37319ea876
@ -6,7 +6,7 @@ const activeQueries = [];
|
|||||||
|
|
||||||
const udpSocket = dgram.createSocket('udp4');
|
const udpSocket = dgram.createSocket('udp4');
|
||||||
udpSocket.unref();
|
udpSocket.unref();
|
||||||
udpSocket.bind(21943);
|
udpSocket.bind();
|
||||||
udpSocket.on('message', (buffer, rinfo) => {
|
udpSocket.on('message', (buffer, rinfo) => {
|
||||||
if(Gamedig.debug) {
|
if(Gamedig.debug) {
|
||||||
console.log(rinfo.address+':'+rinfo.port+" <--UDP");
|
console.log(rinfo.address+':'+rinfo.port+" <--UDP");
|
||||||
|
Loading…
Reference in New Issue
Block a user