Skip to content

Commit 5b75b47

Browse files
committed
Rollback: socket timeout was necessary.
1 parent 8a09b14 commit 5b75b47

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Scripts/net/DCSServerBot/DCSServerBot.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ if dcsbot.UDPSendSocket == nil then
2525
package.cpath = package.cpath..";.\\LuaSocket\\?.dll;"
2626
local socket = require("socket")
2727
dcsbot.UDPSendSocket = socket.udp()
28+
dcsbot.UDPSendSocket:settimeout(0)
2829
dcsbot.UDPSendSocket:setsockname("*", 0)
2930
end
3031

Scripts/net/DCSServerBot/DCSServerBotMain.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ local function createSimulationFrameHandler()
2020
local ip = socket.dns.toip(host)
2121
local UDPRecvSocket = socket.udp()
2222
UDPRecvSocket:setsockname(ip, port)
23+
UDPRecvSocket:settimeout(0)
2324
UDPRecvSocket:setoption('reuseaddr', true)
2425
log.write('DCSServerBot', log.DEBUG, 'Listening on port ' .. tostring(port) .. '/udp')
2526

0 commit comments

Comments
 (0)