fix(net): preserve failed session tick stacks

Keep the original exception stack when cleanup succeeds so connected lifecycle failures identify the real packet/event handler instead of the session wrapper.

Co-authored-by: Erik Nilsson <erikn@users.noreply.github.com>
This commit is contained in:
Erik 2026-07-24 19:48:11 +02:00
parent 621f70eab6
commit 3f1548b952
2 changed files with 8 additions and 1 deletions

View file

@ -342,6 +342,8 @@ internal sealed class LiveSessionController
catch (Exception tickError)
{
Exception error = StopAfterFailure(tickError);
if (ReferenceEquals(error, tickError))
throw;
throw error;
}
});