Connection constantly, randomly disconnecting & reconnecting

Description

When streaming music from PC to android, the phone keeps disconnecting in random intervals, sometimes multiple times within a few minutes, sometimes only once in a half hour. It will remain disconnected for anywhere between 10 seconds to 5 minutes. Bluetooth is turned off on PC (though I am using bluetooth earbuds on android). Disconnecting and reconnecting does not change the outcome, other than having to repeatedly click on “connect” manually for up to 5 minutes. “Forgetting” the device also does not speed up the re-connection. I have also changed my wifi network profile in windows to private, no change to the behaviour. I also updated from the stable 0.27.5 release to the latest alpha release, the bug remains.

I will additionally get UDP errors at less frequent intervals (not receiving audio).

Error log (UDP error at top, disconnection error follows, successful re-connection at end):

2026-01-10 21:58:06.402 [INF] Client connected; local: /10.0.0.165:29150 remote: /10.0.0.32:39878
2026-01-10 21:58:06.913 [INF] Starting capture on Headphones (Realtek(R) Audio)
2026-01-10 21:58:06.916 [INF] Asking backend to start capture. EventSync: true, ContinuousStream: true, AudioConfig: AudioConfig(sampleRate=48000, bits=16, channels=2), AudioDevice: Headphones (Realtek(R) Audio), 
2026-01-10 21:58:06.918 [INF] Audio socket waiting on a connection...
2026-01-10 21:58:06.919 [INF] Audio socket connected
2026-01-10 21:58:06.920 [INF] [kj9] No data emitted by audio pipeline (PipelineId(value=9fdf4cfd-6e09-4ef0-84a4-6ca272ea5f58)), sending empty values...
2026-01-10 21:58:07.928 [INF] [kj9] Audio pipeline (PipelineId(value=9fdf4cfd-6e09-4ef0-84a4-6ca272ea5f58)) is emitting values
2026-01-10 21:59:48.259 [INF] [a00] Remote device disabling audio stream…
2026-01-10 21:59:49.388 [INF] [a00] Remote device enabling audio stream…
2026-01-10 21:59:49.416 [INF] Starting capture on Headphones (Realtek(R) Audio)
2026-01-10 21:59:49.424 [INF] Asking backend to start capture. EventSync: true, ContinuousStream: true, AudioConfig: AudioConfig(sampleRate=48000, bits=16, channels=2), AudioDevice: Headphones (Realtek(R) Audio), 
2026-01-10 21:59:49.428 [INF] Audio socket waiting on a connection...
2026-01-10 21:59:49.432 [INF] [kj9] No data emitted by audio pipeline (PipelineId(value=4d271572-dad6-4832-9b7c-28b005055f16)), sending empty values...
2026-01-10 21:59:49.436 [INF] Audio socket connected
2026-01-10 21:59:50.459 [INF] [kj9] Audio pipeline (PipelineId(value=4d271572-dad6-4832-9b7c-28b005055f16)) is emitting values
2026-01-10 22:08:24.918 [ERR] [SERVER] Connection from 10.0.0.32: A network error occurred
w9d: f61: Channel was closed
	at qb6.a(SourceFile:168)
	at njc.a(SourceFile:4)
	at ehb.invokeSuspend(SourceFile:10)
	at ehb.invoke(SourceFile:2)
	at hpe.a(SourceFile:12)
	at ie0.a(SourceFile:48)
	at fhb.a(SourceFile:35)
	at dhb.invokeSuspend(SourceFile:1)
	at ov.resumeWith(SourceFile:5)
	at mb3.run(SourceFile:168)
	at g12.run(SourceFile:515)
Caused by: f61: Channel was closed
	at mb0.d(SourceFile:3)
	at mb0.b(SourceFile:5762)
	at mb0.a(SourceFile:12989)
	at qb6.a(SourceFile:167)
	... 10 more

2026-01-10 22:08:24.919 [ERR] [SERVER] Connection from 10.0.0.32: A network error occurred
w9d: f61: Channel was closed
	at qb6.a(SourceFile:168)
	at njc.a(SourceFile:4)
	at ehb.invokeSuspend(SourceFile:10)
	at ehb.invoke(SourceFile:2)
	at hpe.a(SourceFile:12)
	at ie0.a(SourceFile:48)
	at fhb.a(SourceFile:35)
	at dhb.invokeSuspend(SourceFile:1)
	at ov.resumeWith(SourceFile:5)
	at mb3.run(SourceFile:168)
	at g12.run(SourceFile:515)
Caused by: f61: Channel was closed
	at mb0.d(SourceFile:3)
	at mb0.b(SourceFile:5762)
	at mb0.a(SourceFile:12989)
	at qb6.a(SourceFile:167)
	... 10 more

2026-01-10 22:08:24.919 [ERR] [SERVER] Connection from 10.0.0.32: A network error occurred
w9d: f61: Channel was closed
	at qb6.a(SourceFile:168)
	at njc.a(SourceFile:4)
	at ehb.invokeSuspend(SourceFile:10)
	at ehb.invoke(SourceFile:2)
	at hpe.a(SourceFile:12)
	at ie0.a(SourceFile:48)
	at fhb.a(SourceFile:35)
	at dhb.invokeSuspend(SourceFile:1)
	at ov.resumeWith(SourceFile:5)
	at mb3.run(SourceFile:168)
	at g12.run(SourceFile:515)
Caused by: f61: Channel was closed
	at mb0.d(SourceFile:3)
	at mb0.b(SourceFile:5762)
	at mb0.a(SourceFile:12989)
	at qb6.a(SourceFile:167)
	... 10 more

2026-01-10 22:08:24.919 [ERR] [SERVER] Connection from 10.0.0.32: A network error occurred
w9d: f61: Channel was closed
	at qb6.a(SourceFile:168)
	at njc.a(SourceFile:4)
	at ehb.invokeSuspend(SourceFile:10)
	at ehb.invoke(SourceFile:2)
	at hpe.a(SourceFile:12)
	at ie0.a(SourceFile:48)
	at fhb.a(SourceFile:35)
	at dhb.invokeSuspend(SourceFile:1)
	at ov.resumeWith(SourceFile:5)
	at mb3.run(SourceFile:168)
	at g12.run(SourceFile:515)
Caused by: f61: Channel was closed
	at mb0.d(SourceFile:3)
	at mb0.b(SourceFile:5762)
	at mb0.a(SourceFile:12989)
	at qb6.a(SourceFile:167)
	... 10 more

2026-01-10 22:08:24.920 [ERR] [SERVER] Connection from 10.0.0.32: A network error occurred
w9d: f61: Channel was closed
	at qb6.a(SourceFile:168)
	at njc.a(SourceFile:4)
	at ehb.invokeSuspend(SourceFile:10)
	at ehb.invoke(SourceFile:2)
	at hpe.a(SourceFile:12)
	at ie0.a(SourceFile:48)
	at fhb.a(SourceFile:35)
	at dhb.invokeSuspend(SourceFile:1)
	at ov.resumeWith(SourceFile:5)
	at mb3.run(SourceFile:168)
	at g12.run(SourceFile:515)
Caused by: f61: Channel was closed
	at mb0.d(SourceFile:3)
	at mb0.b(SourceFile:5762)
	at mb0.a(SourceFile:12989)
	at qb6.a(SourceFile:167)
	... 10 more

2026-01-10 22:09:52.740 [INF] Client connected; local: /10.0.0.165:29150 remote: /10.0.0.32:43434
2026-01-10 22:09:53.133 [INF] Starting capture on Headphones (Realtek(R) Audio)
2026-01-10 22:09:53.134 [INF] Asking backend to start capture. EventSync: true, ContinuousStream: true, AudioConfig: AudioConfig(sampleRate=48000, bits=16, channels=2), AudioDevice: Headphones (Realtek(R) Audio), 
2026-01-10 22:09:53.135 [INF] Audio socket waiting on a connection...
2026-01-10 22:09:53.135 [INF] [kj9] No data emitted by audio pipeline (PipelineId(value=d79c25b8-5da3-4e86-911e-cd0b46ade537)), sending empty values...
2026-01-10 22:09:53.138 [INF] Audio socket connected
2026-01-10 22:09:54.156 [INF] [kj9] Audio pipeline (PipelineId(value=d79c25b8-5da3-4e86-911e-cd0b46ade537)) is emitting values

Devices

Phone:
Android 15
Fairphone 4
AudioRelay 1.0.0-alpha06 & 0.27.5

Laptop:
MSI, Windows 11
AudioRelay 1.0.0-alpha06 & 0.27.5