Keep the gateway connection alive and resume hosted queues after reconnecting
CI / build (push) Successful in 30s

The client doesn't ping while it's sending, so when the proxy answers its frames itself (everything it
sends in a hosted room), IMVU's gateway saw an idle connection and closed it after about a minute. A
ping now goes to the gateway in place of each answered frame. And after a reconnect, hosted rooms'
queues are taken out of C2gOpenFloodgates and answered here (the gateway never answered them, so the
client gave up and closed the room).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
dhkatzandClaude Opus 5.5 committed 2026-10-30 05:37:53 -07:00
1 parent c483099558
commit 08a2ed94a3
4 files changed
+94 -12

No files matched your search

+2 -1
View File
@@ -427,7 +427,8 @@ func TestConnectFiltersOutgoingMessages(t *testing.T) {
}
conn.Close()
got := <-received
want := append(send(1, "messages", "hi!"), send(3, "control", "x")...)
// The dropped message's place: a ping, so the gateway doesn't see an idle connection.
want := append(append(send(1, "messages", "hi!"), imq.EncodeFrame(imq.C2gPing, nil)...), send(3, "control", "x")...)
if !bytes.Equal(got, want) {
t.Fatalf("gateway got %q, want %q", got, want)
}