From d424c473972ce27c4e6cfc5318816d648ccb4ea3 Mon Sep 17 00:00:00 2001 From: Andris0 Date: Wed, 14 Aug 2019 22:55:31 +0300 Subject: [PATCH] Reset `heartbeat_ack` on WS reconnect. --- lib/nostrum/shard/session.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nostrum/shard/session.ex b/lib/nostrum/shard/session.ex index e67e15d99..5b53585d6 100644 --- a/lib/nostrum/shard/session.ex +++ b/lib/nostrum/shard/session.ex @@ -139,7 +139,7 @@ defmodule Nostrum.Shard.Session do stream = :gun.ws_upgrade(worker, @gateway_qs) await_ws_upgrade(worker, stream) Logger.warn("Reconnected after connection broke") - {:noreply, state} + {:noreply, %{state | heartbeat_ack: true}} end def handle_cast({:status_update, payload}, state) do