If a pending stream management session is closed with a stream error,
this is usually due to the client opening a new stream that conflicts
with the old one. Don't generate a push notification in this situation.
%% Hook callbacks.
%%--------------------------------------------------------------------
-spec c2s_stanza(c2s_state(), xmpp_element() | xmlel(), term()) -> c2s_state().
+c2s_stanza(State, #stream_error{}, _SendResult) ->
+ State;
c2s_stanza(#{push_enabled := true, mgmt_state := pending} = State,
_Pkt, _SendResult) ->
notify(State),