sepalani / MH3SP

Monster Hunter 3 (~tri) Server Project
GNU Affero General Public License v3.0
195 stars 19 forks source link

Fix deadlocks when an error occurs early #115

Closed sepalani closed 1 year ago

sepalani commented 1 year ago

A follow up of https://github.com/sepalani/MH3SP/pull/114.

This PR fixes deadlocks when exceptions occur early (ex: ports already used) since __is_shut_down wasn't set and close is waiting for the event.

I also changed max_threads (which only auto-detect when set to zero, now, which is the default value) as we don't use negative numbers, AFAICT.

Ready to be reviewed & tested.