diff --git a/CHANGELOG.md b/CHANGELOG.md index e3d681a..c779241 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# v5.1.4 (27/03/2026) +* Fix the gateway failing to heartbeat after reconnecting (Copilot/Filip Hoffmann) + # v5.1.3 (05/03/2026) * Fix some components not being serialized with the `type` field (Filip Hoffmann) * Fix the invalid session event being improperly parsed as a bool (not the data field) (Filip Hoffmann) diff --git a/src/grom/gateway.gleam b/src/grom/gateway.gleam index 585dce2..c6f3ca9 100644 --- a/src/grom/gateway.gleam +++ b/src/grom/gateway.gleam @@ -2992,6 +2992,7 @@ fn on_message( message: stratus.Message(StratusUserMessage), connection: stratus.Connection, ) -> stratus.Next(Connection, StratusUserMessage) { + echo message case message { stratus.Text(text_message) -> on_text_message(connection_state, connection, text_message) @@ -3423,7 +3424,10 @@ fn on_hello_event( // heartbeat manager. The RESUME payload was already queued // in resume(), so we must not send IDENTIFY here. stratus.continue( - Identified(..connection_state, heartbeat_manager: heartbeat_manager.data), + Identified( + ..connection_state, + heartbeat_manager: heartbeat_manager.data, + ), ) } }