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

Add some error logging in Listener.Serve(). #303

Merged
merged 5 commits into from
Sep 29, 2023
Merged

Add some error logging in Listener.Serve(). #303

merged 5 commits into from
Sep 29, 2023

Conversation

werbenhu
Copy link
Member

When I use an incorrect WebSocket address (for example, go run main.go -ws=1882 where there is a missing colon before '1882'), it's challenging to pinpoint and discover where the problem lies. The server appears to be running fine. I suggest adding some error logging in Listener.Serve() to assist with troubleshooting.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6285127154

  • 25 of 25 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 98.908%

Totals Coverage Status
Change from base Build 6277994351: 0.003%
Covered Lines: 5435
Relevant Lines: 5495

💛 - Coveralls

@dgduncan
Copy link
Collaborator

Should this be added to every listener? It seems like it would make sense that we bubble up the same error on every listener to make sure that the same issue does not effect the others.

@werbenhu
Copy link
Member Author

@dgduncan As it stands now, I believe we should, at the very least, add error logging within the Serve() methods of the WebSocket and HTTPStats listeners.

Copy link
Collaborator

@mochi-co mochi-co left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, disregarding the docker build errors as that's my fault 😄

@mochi-co mochi-co merged commit 0d880fa into mochi-mqtt:main Sep 29, 2023
2 of 3 checks passed
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.

None yet

4 participants