Diagnostics: surface upstream WS close reason + break the null-spin loop
The Pi journal showed 170 000 'upstream silent NxN' messages within one second — i.e. ReceiveJsonAsync was returning null in zero time, so the upstream WS to OpenAI was closed. The relay was spinning until idle watchdog (30 s) fired. Add IRealtimeUpstream.IsClosed + CloseReason, populated by OpenAIRealtimeUpstream from the close status / WS exception, and have PumpAsync stop on close and forward error code=upstream_closed message=close status=<X> desc=<Y> to the device. Closes the spin AND gives us the OpenAI close reason.
This commit is contained in:
@@ -179,7 +179,7 @@ public static class DeviceHubEndpoint
|
||||
|
||||
// Bump on every backend change so we can verify a Coolify deploy landed
|
||||
// by looking at the hello_ack config.server_version field in the Pi journal.
|
||||
public const string ServerVersion = "plan3-debug-2026-06-12-09";
|
||||
public const string ServerVersion = "plan3-debug-2026-06-12-09-closeprobe";
|
||||
|
||||
private static async Task SendHelloAckAsync(ActiveDevice active, Device device, CancellationToken ct)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user