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

Network not connecting on Windows #6

Closed
albertnis opened this issue May 15, 2020 · 2 comments · Fixed by #7
Closed

Network not connecting on Windows #6

albertnis opened this issue May 15, 2020 · 2 comments · Fixed by #7
Labels
bug Something isn't working

Comments

@albertnis
Copy link
Owner

albertnis commented May 15, 2020

On Windows, the client reconnects many times very quickly, then the program exits.

@albertnis
Copy link
Owner Author

Error is as follows. Client disconnects upon subscription.

2020/05/16 17:40:03 Connecting to client XXX:1883... 
2020/05/16 17:40:04 Client connected
2020/05/16 17:40:10 Subscribing to topic XXX... 
2020/05/16 17:40:37 Client connection lost unexpectedly
2020/05/16 17:40:39 Client connected
2020/05/16 17:40:47 Subscribing to topic XXX... 
2020/05/16 17:40:47 write tcp XXX:54636->XXX:1883: use of closed network connection

@albertnis
Copy link
Owner Author

This was due to using a duplicate client ID. This appears to be an issue even when the original client (the one being duplicated) isn't actively connected to the broker. The closest a fix is to do the following:

  • Add to the disconnection error message stating this may be caused by a duplicate client ID
  • Remove the default for the client ID parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant