Skip to content

Commit

Permalink
Merge pull request #580 from Kraigie/drop-session-on-bad-resume
Browse files Browse the repository at this point in the history
Drop session on invalid and unresumable session
  • Loading branch information
jb3 authored May 4, 2024
2 parents 4646cbc + 556837b commit 89803a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nostrum/shard/event.ex
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ defmodule Nostrum.Shard.Event do

def handle(:invalid_session, %{d: _can_resume? = false}, state) do
Logger.info("Invalid and un-resumable session at #{state.session}. Events may be lost.")
{{state, :reconnect}, []}
{{%{state | session: nil}, :reconnect}, []}
end

def handle(:reconnect, _payload, state) do
Expand Down

0 comments on commit 89803a2

Please # to comment.