refactor(link): bound every teardown and handler wait behind one helper [CI]
ci/woodpecker/push/web-build Pipeline was successful
ci/woodpecker/push/verify Pipeline was successful
ci/woodpecker/push/dev-image Pipeline was successful

This commit is contained in:
justme committed 2026-10-19 10:07:36 +08:00
1 parent c05842fd91
commit d95acc6575
10 files changed
+130 -31

No files matched your search

@@ -34,12 +34,20 @@ internal sealed partial class NodeConnection
{
if (TryParse(frame.Data, out RpcMessage? message))
{
await HandleMessageAsync(message, ct);
if (!await Bounded.WaitAsync(HandleMessageAsync(message, ct), _host.Options.HandlerTimeout, _host.Time))
{
_closeReason ??= "handler timeout";
return;
}
}
}
else
{
await HandleBinaryAsync(frame.Data, ct);
if (!await Bounded.WaitAsync(HandleBinaryAsync(frame.Data, ct), _host.Options.HandlerTimeout, _host.Time))
{
_closeReason ??= "handler timeout";
return;
}
}
}
}