summaryrefslogtreecommitdiff
path: root/src/town_map.h
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-07-11 22:37:14 +0200
committerGitHub <noreply@github.com>2021-07-11 22:37:14 +0200
commitdd7f69be6ed6ea90ec806c86957f10332206bcd6 (patch)
tree97164c5c8fe4a2d37762a7095ac8bb4c78f29a6c /src/town_map.h
parent178ea3196b0aed0a2a081801f92e1deb06d12628 (diff)
downloadopenttd-dd7f69be6ed6ea90ec806c86957f10332206bcd6.tar.xz
Fix: "Search LAN games" used the socket after it was closed (#9437)
Every outgoing connection, either TCP or UDP, triggered NetworkInitialize(), which triggered NetworkUDPInitialize() which first closes all connections. Now the problem was that "Search LAN games" found a server, added it to the list, after which (over TCP) it queries the server. This closes all UDP sockets (as that makes sense, I guess?), while the UDP was still reading from it. Solve this by simply stop initializing UDP every time we make an outgoing TCP connection; instead only do it on start-up.
Diffstat (limited to 'src/town_map.h')
0 files changed, 0 insertions, 0 deletions