Enhance school management and protocol handling by introducing a new worker failure mechanism, ensuring proper cleanup of schools when a worker thread encounters an error. Update the map snapshot protocol to allow larger school data sizes, improving the handling of extensive map layouts. Revise documentation to reflect changes in save intervals and introduce a minimum save interval for better performance. Update tests to validate the new functionalities and ensure robustness in handling large data scenarios.
This commit is contained in:
@@ -95,6 +95,10 @@ internal sealed class GameSocketHandler(
|
||||
commands.Enqueue(new GameCommand.CloseSchool(client.PlayerId, watchedSchoolId));
|
||||
}
|
||||
|
||||
// Cancel first, then wait. The other order hung here whenever the send loop sat inside
|
||||
// SendAsync on a half-open connection: nothing was left to cancel it.
|
||||
await connectionCts.CancelAsync().ConfigureAwait(false);
|
||||
|
||||
if (sendLoop is not null)
|
||||
{
|
||||
try
|
||||
@@ -106,8 +110,6 @@ internal sealed class GameSocketHandler(
|
||||
// Expected while tearing the connection down.
|
||||
}
|
||||
}
|
||||
|
||||
await connectionCts.CancelAsync().ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user