-
Notifications
You must be signed in to change notification settings - Fork 541
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
Data race in mqtt client #170
Comments
I can confirm that I have seen this, or something close, involving errorWatch() too. |
I wonder if that's because errorWatch() was run as a goroutine but not part of the workers syncGroup (and I don't know why it wasn't). I've just made a change to catch it returning as part of the waitgroup, hopefully this will remove this issue. |
I have run a bunch of testing of this change (commit cd4337d) and I have not seen the race recur. I think that this can be resolved. |
thanks 👍 |
WARNING: DATA RACE
Write by goroutine 82:
XXX/vendor/github.com/eclipse/paho%2emqtt%2egolang.(*client).Connect.func1()
XXX/vendor/github.com/eclipse/paho.mqtt.golang/client.go:240 +0x1603
Previous read by goroutine 60:
XXX/vendor/github.com/eclipse/paho%2emqtt%2egolang.errorWatch()
XXX/vendor/github.com/eclipse/paho.mqtt.golang/net.go:324 +0x4b
Goroutine 82 (running) created at:
XXX/vendor/github.com/eclipse/paho%2emqtt%2egolang.(*client).Connect()
XXX/vendor/github.com/eclipse/paho.mqtt.golang/client.go:277 +0x41e
.....
Goroutine 60 (finished) created at:
XXX/vendor/github.com/eclipse/paho%2emqtt%2egolang.(*client).Connect.func1()
XXX/vendor/github.com/eclipse/paho.mqtt.golang/client.go:267 +0x1bb0
The text was updated successfully, but these errors were encountered: