wrparker/alluvian-engine

Prevent Thread Locking: Move Protocol Negotiation to Main Loop

wrparker opened this issue · 0 comments

Currently, protocol negotiation for a player happens all together. This means that all actions from other players are paused in the MUD until protocol negotiation is completed. Ideally, we should move protocol negotiation so that it is handled in the main loop rather than doing it all together.

The reason for this is because waiting for timeouts on protocol negotiation causes all other players to freeze until that player's telnet protocol negotiations are complete.

i.e.: the functions in alluvian/server/protocol.py should be handled similarly to how the Login system is handled so the thread isn't locked to a player every time they connect.

An alternative, hacky solution would be to give a very small response time allowed for protocol negotiation (currently it is set to 2 seconds).