Skip to content

Refactor the network code and add a net_utils module#139

Open
sepalani wants to merge 6 commits intodevfrom
net-utils
Open

Refactor the network code and add a net_utils module#139
sepalani wants to merge 6 commits intodevfrom
net-utils

Conversation

@sepalani
Copy link
Copy Markdown
Owner

Based on top of #138, this PR refactors the network code, most of the reasoning is described in the commit description. It should solve most (not all) network issues we have. I mainly tried to solved the following ones:

  • having to wait before restarting the server
  • Wii/Dolphin sometimes hanging when the connection crashed
  • exception and dying thread being unnoticed

This refactoring will also allow to deduplicate the open-beta central_server code.

Ready to be reviewed & tested.

kbarkevich and others added 6 commits July 25, 2025 23:51
Other changes:
 - city.is_empty method added
 - assert_fields when searching cities fixed
 - workaround for cyclic import (wip)
Fix MaxThread option being ignored.

Remove unused legacy_ssl parameter.
Add some more type hints
Try to address several issues we have, as follows:
 - DRY principle
 - more documentation (docstrings, type-hints)
 - less `try..except` clutter and error silencing
 - more logging
 - unused variables removed
 - avoid RuntimeError while iterating+deleting items from a container
 - use SO_REUSEADDR to address some (not all) TIME_WAIT issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants