Commit Graph

426 Commits

Author SHA1 Message Date
zarazaex69 cc65c033e2 fix(jitsi): prevent reconnect loops and idle 2026-06-01 12:51:06 +03:00
e.barskov bd1a95cac5 fix(jitsi): re-allocate Jicofo focus on reconnect (non-blocking)
The lightweight soft-rejoin path (jSess.Rejoin) skips Jicofo focus
allocation and joins the MUC with a bare presence. After the client
leaves and Jicofo idle-terminates the now-empty conference
(session-terminate <expired/>), the room/focus is torn down. A bare
rejoin presence is then rejected by Prosody with
<presence type='error'><not-allowed/>, and the library's JoinMUC matches
a stale status-110 left in its stanza buffer and falsely reports success.
The engine then waits forever for a session-initiate that never arrives
while actually being outside the room, so the client can never reconnect.

Re-establish the session from scratch via j.JoinMUC instead, which runs
dial -> focus allocation -> MUC join in the correct order (focus first,
so Jicofo recreates the room), exactly like the initial Connect, but
WITHOUT blocking on session-initiate. The fresh session-initiate is
awaited separately via WaitJingleReinitiate once a peer rejoins, so the
non-blocking reconnect contract is preserved.

Verified on a live deployment: two consecutive reconnect cycles now
complete (bridge open sctp -> reconnected -> session opened) where the
old path hung after "waiting for session-initiate".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 00:36:25 +04:00
zarazaex69 dfce46dd5f fix(jitsi): add bridge keepalive loop 2026-05-31 19:41:09 +03:00
zarazaex69 71b1fbdf27 fix(jitsi): make Connect non-blocking, wait for session-initiate async
j.Join() blocks on WaitJingle until Jicofo sends session-initiate,
which only happens when a second participant joins the room. With the
transport-level connect timeout (30-60s), the server crashes if no one
joins in time.

Switch to j.JoinMUC() which returns immediately after joining the MUC.
A background goroutine (waitForJingle) waits for session-initiate and
then opens the bridge + negotiates the PeerConnection. This way Connect
succeeds as soon as the XMPP connection is established, regardless of
whether another participant is present.
2026-05-31 13:07:22 +03:00
zarazaex ab848b4c48 Merge pull request #84 from grandgaev/fix/rtcp-keepalive-wedge
fix(jitsi): break out of rtcpKeepalive on persistent write errors
2026-05-31 07:55:28 +03:00
Rock Brock ffa5d4ac13 fix(jitsi): break out of rtcpKeepalive loop on persistent write errors
When the JVB bridge disconnects but the session is not yet closed
(e.g. during a pending reconnect), rtcpKeepalive spins indefinitely
logging "rtcp keepalive write: io: read/write on closed pipe" every
5 seconds. The process appears alive but is functionally dead —
systemd Restart=always never triggers and the instance becomes
permanently wedged.

Add an error counter that triggers requestReconnect after 3
consecutive WriteRTCP failures, allowing the supervisor to
tear down and re-establish the bridge connection. Reset the
counter on any successful write.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 07:23:23 +05:00
zarazaex69 efadd37df4 fix: golangci 2026-05-30 12:16:20 +03:00
zarazaex69 da3bf43721 style: normalize dash usage in comments and logs 2026-05-29 22:08:36 +03:00
zarazaex69 c4984f65d6 fix(jitsi): reuse xmpp session on reconnect. fix #82 2026-05-29 22:07:15 +03:00
zarazaex69 52aea2d79d fix(vp8channel): add byte-rate pacer to prevent policer collapse 2026-05-29 19:16:59 +03:00
zarazaex69 33f46460dc test(e2e): tune videochannel params and reduce chunk timeout 2026-05-28 13:19:14 +03:00
zarazaex69 1427c0d3c7 fix(videochannel): increase timeouts to handle SFU renegotiation delays 2026-05-28 05:54:18 +03:00
zarazaex69 5a3b5bbdce test: reduce videochannel e2e transport options for faster tests 2026-05-28 03:56:12 +03:00
zarazaex69 9f25ac59fc perf(videochannel): reduce ack timeout and multiplier 2026-05-28 02:42:50 +03:00
zarazaex69 cfa1bd6083 test(e2e): mark jitsi video transports as unstable
- temporary crutch
2026-05-27 14:05:23 +03:00
zarazaex69 15e597cff9 test(e2e): update carrier/transport expectations matrix 2026-05-27 13:12:06 +03:00
zarazaex69 57db32f70c chore: remove gr git submodule 2026-05-27 11:31:19 +03:00
zarazaex69 4ab4413f50 refactor(videochannel): remove ffmpeg support and fix lint 2026-05-27 11:08:49 +03:00
zarazaex69 552151fece fix(videochannel): force VP8 keyframes and drop bad frames 2026-05-27 10:55:37 +03:00
zarazaex69 0a5d3fb922 fix(videochannel): ignore vp8 missing reference errors 2026-05-27 07:54:33 +03:00
zarazaex69 65dbb93221 refactor(videochannel): replace ffmpeg with Go VP8 codec
- thnks rape4me/kc for vp8 enc/dec
2026-05-26 19:11:11 +03:00
zarazaex69 d7c813265b fix(vp8channel): rotate epoch header on KCP reset 2026-05-26 12:42:41 +03:00
zarazaex69 b8933e10b5 docs: replace em dashes with hyphens in docs and comments 2026-05-26 10:27:04 +03:00
zarazaex69 b9b8c8137e fix(e2e): skip soak test on auth failure instead of failing 2026-05-26 02:54:14 +03:00
zarazaex69 10c7c655b6 fix(vp8channel): reset peer state on KCP restart 2026-05-26 02:50:29 +03:00
zarazaex69 1f26687c48 test(e2e): support multiple carriers in real soak test 2026-05-26 01:14:05 +03:00
zarazaex69 4fce5773f8 fix(goolom): remove premature onReconnect callback invocation 2026-05-26 01:05:31 +03:00
zarazaex69 743dc5c1bf fix(client): return after liveness reconnect to avoid deadlock #72 2026-05-25 23:33:51 +03:00
zarazaex69 9597a4ebb6 test(e2e): add chaos mode to local soak test 2026-05-25 22:54:00 +03:00
zarazaex69 7a416cbde7 test(e2e): add real-carrier throughput soak test 2026-05-25 22:44:03 +03:00
zarazaex69 b797858857 perf(seichannel): increase frame rate and batch size defaults 2026-05-25 22:39:41 +03:00
zarazaex69 e9a49239ef test(e2e): update seichannel options to match vp8channel settings 2026-05-25 22:38:38 +03:00
zarazaex69 09f591a26b fix(seichannel): scale ack timeout with fragment count and skip
re-enqueue on retry
2026-05-25 22:21:42 +03:00
zarazaex69 af9eeea740 docs: add meet.cryptopro.ru as alternative Jitsi server option 2026-05-25 15:43:28 +03:00
zarazaex69 fe85457754 fix(jitsi): add RTCP keepalive to prevent JVB session expiry 2026-05-25 12:57:18 +03:00
zarazaex69 e64ed167cc refactor(jitsi): extract openBridgeWS and openBridgeSCTP helpers 2026-05-25 11:39:22 +03:00
zarazaex69 c2170c058b feat(jitsi): add SCTP fallback when colibri-ws is unavailable
- Fixed instances that were not working x3
2026-05-25 10:41:23 +03:00
zarazaex69 12a28e6cbf chore: replace default jitsi URL with meet1.arbitr.ru 2026-05-25 10:08:26 +03:00
zarazaex69 e677261fd5 refactor: improve error wrapping and extract constructor helper 2026-05-25 04:06:26 +03:00
zarazaex69 83a94948ae fix(vp8channel): latch peer epoch on first frame received 2026-05-24 18:05:43 +03:00
zarazaex69 6d529c16a8 fix(vp8channel): latch peer only after handshake confirms it
Previously the client latched on the first epoch it saw, which could
be another client in the room. Now it accepts frames from all epochs
until onData delivers the first KCP message (handshake welcome),
then locks to that epoch and ignores others.

Fixes #67
2026-05-24 17:49:02 +03:00
zarazaex69 11dfdcb512 fix(vp8channel): demote noisy 'ignoring frame' log to trace 2026-05-24 17:36:19 +03:00
zarazaex69 d0b0b8e9db fix(vp8channel): client ignores frames from other participants
In single-peer mode (client), frames from unknown epochs are now
silently dropped instead of triggering a reconnect loop. This
prevents the client from mistaking another client's VP8 track
for a server restart.

Part of #67
2026-05-24 17:33:51 +03:00
zarazaex69 cefd260e5d fix(vp8channel): support multiple simultaneous clients in same room
Implement PeerTransport interface (SendTo/SupportsPeerRouting) so the
server can route KCP traffic to individual peers by their epoch.

When OnPeerData is set (server mode), each remote epoch gets its own
KCP runtime instead of triggering a reconnect loop.

Also add DNS retry in protect.NewHTTPClient to handle transient
resolver failures.

Fixes #67
2026-05-24 17:27:02 +03:00
zarazaex69 cb6fe0980d feat(protect): add DNS retry logic to HTTP client 2026-05-24 17:27:02 +03:00
zarazaex69 98c6dec4a0 docs: normalize em dash to hyphen in Russian documentation and code comments 2026-05-24 05:31:55 +03:00
zarazaex69 cfe9565c21 test(e2e): remove standalone pion loopback PoC after integration into memoryStream 2026-05-24 04:46:53 +03:00
zarazaex69 4d22169be6 test(e2e): add in-memory WebRTC loopback for video transport testing 2026-05-24 04:45:06 +03:00
zarazaex69 f63aa0bc43 refactor(e2e): extract local soak transport error constants 2026-05-24 02:57:30 +03:00
zarazaex69 bb2e1ee1c8 test(e2e): allow multiple transports in local soak test via comma-separated list or 'all' 2026-05-24 02:42:13 +03:00