You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a client is signed in with a given resource and you attempt to connect another instance with the same resource, you end up with a resource conflict. You will receive the following error stanza:
<stream:error>
<conflictxmlns='urn:ietf:params:xml:ns:xmpp-streams'></conflict>
<textxml:lang='en'xmlns='urn:ietf:params:xml:ns:xmpp-streams'>
Replaced by new connection
</text>
</stream:error>
This will crash the client.
Error in process <0.9905.0> on node 'hedwig@127.0.0.1' with exit value: {badarg,[{'Elixir.Hedwig.Client',handle_stanza,2,[{file,
"lib/hedwig/client.ex"},{line,77}]},{'Elixir.Hedwig.Conn',await,1,[{file,"lib/hedwig/conn.ex"},{line,137}]}]}
Should probably just ignore when a record gets passed to handle_stanza/2:
I also have a similar error that I think is related to this issue:
14:57:29.955 [error] Process #PID<0.157.0> raised an exception
** (BadMapError) expected a map, got: {:xmlstreamend, "stream:stream"}
(hedwig) lib/hedwig/client.ex:78: Hedwig.Client.handle_stanza/2
(hedwig) lib/hedwig/conn.ex:133: Hedwig.Conn.await/1
I tried to modify handle_stanza/2 as you suggested, but I did not correct the problem. I am not too sure how to fix this, a case maybe?
My goal is to get many (1000 +)processes responding to a handler I created, currently I can only get 5, supervisor can not seem to start them fast enough. Looking at the observer the pids are changing very fast, so I assume each client is continually crashing.
Do you have any suggestions to fix handle_stanza/2.
When a client is signed in with a given resource and you attempt to connect another instance with the same resource, you end up with a resource conflict. You will receive the following error stanza:
This will crash the client.
Should probably just ignore when a record gets passed to
handle_stanza/2
:The text was updated successfully, but these errors were encountered: