Skip to content
New issue

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

Fix panic on reconnect #451

Merged
merged 1 commit into from
Sep 18, 2020
Merged

Fix panic on reconnect #451

merged 1 commit into from
Sep 18, 2020

Conversation

johanstokking
Copy link
Contributor

We're getting a panic with ca94c53 (current master):

2020-09-17T13:10:34.159+02:00	panic: runtime error: invalid memory address or nil pointer dereference
2020-09-17T13:10:34.159+02:00	[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1affabf]
2020-09-17T13:10:34.159+02:00	goroutine 1673161 [running]:
2020-09-17T13:10:34.159+02:00	github.com/eclipse/paho%2emqtt%2egolang.(*client).reconnect(0xc001db5680)
2020-09-17T13:10:34.159+02:00	/home/runner/go/pkg/mod/github.com/eclipse/paho.mqtt.golang@v1.2.1-0.20200609161119-ca94c5368c77/client.go:321 +0x31f
2020-09-17T13:10:34.159+02:00	created by github.com/eclipse/paho%2emqtt%2egolang.(*client).internalConnLost
2020-09-17T13:10:34.159+02:00	/home/runner/go/pkg/mod/github.com/eclipse/paho.mqtt.golang@v1.2.1-0.20200609161119-ca94c5368c77/client.go:459 +0x1f1

This is a regression introduced in #416 where the loop breaks while conn is unset. The log message can still be relevant for debugging.

@MattBrittan

Signed-off-by: Johan Stokking <johan@stokking.nl>
@MattBrittan
Copy link
Contributor

Sorry about introducing that one. I will reach out to @alsm again and see if we can get this committed (unfortunately there are a few outstanding issues; I'm currently running a forked version myself).

@alsm alsm merged commit 5feda7b into eclipse-paho:master Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants