We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
There is an issue with calling StreamManager.Close() causing a segfault in certain situations:
StreamManager.Close()
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x785260] goroutine 1 [running]: gosrc.io/xmpp.(*Client).Disconnect(0xc4200a9860) /go/src/gosrc.io/xmpp/client.go:192 +0x50 gosrc.io/xmpp.(*StreamManager).Stop(0xc42014c630) /go/src/gosrc.io/xmpp/stream_manager.go:106 +0x52 [...]
As far as I can tell this happens
I underestand that these are situations where closing the SM should not be necessary but there is no way to tell.
I am thinking of two different approaches to fix this:
sm.Client.CurrentState
sm.CurrentState()
This would enable me to tell wehther I need to close the SM or not.
Kroev
The text was updated successfully, but these errors were encountered:
I think a better approach would be to guard against the crash and let the client call Close at any time, no matter what the state is.
Sorry, something went wrong.
It should be fixed by this commit: 8794ea6
Could you please reopen the issue if this is not the case?
Thanks for the report!
mremond
No branches or pull requests
Hello,
There is an issue with calling
StreamManager.Close()
causing a segfault in certain situations:As far as I can tell this happens
I underestand that these are situations where closing the SM should not be necessary but there is no way to tell.
I am thinking of two different approaches to fix this:
sm.Client.CurrentState
is possiblesm.CurrentState()
or similarThis would enable me to tell wehther I need to close the SM or not.
Kroev
The text was updated successfully, but these errors were encountered: