transhumandesign / kag-base

King Arthur's Gold base folder.
258 stars 119 forks source link

Connecting with TCPR during server boot results in socket being in use without ever freeing it #2133

Open Vam-Jam opened 1 week ago

Vam-Jam commented 1 week ago

At least on Linux dedicated, connecting to a server with TCPR early on results in:

[14:10:19] Attempting to establish TCPR connection...
[14:10:19] TCPR Failure: binding server socket failed (error Address already in use)

No other TCPR client is allowed to connect until the server reboots.

Vam-Jam commented 1 week ago

Engine patch submitted, bug was caused by socket staying open when the server closes/crashes with tcpr clients connected. SO_REUSEADDR was being set after calling bind(), it should be called before.