H-uru / dirtsand

The D'ni in Real-Time Server and Network Dæmon
GNU Affero General Public License v3.0
35 stars 24 forks source link

Fix a segfault related to clients connecting with the wrong build ID. #188

Closed Hoikas closed 1 year ago

Hoikas commented 1 year ago

Somehow, when repeated connection attempts came in from a single client with a bad build ID, we would hit a segfault where the auth client's broadcast channel would have an invalid message in it. It is unclear how this message got in the channel, but I did notice that poll() is returning that the client's socket is POLLNVAL. Treating POLLNVAL as a regular hangup seems to prevent the problem.