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

Fixed error listen() function #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AslakOffi
Copy link
Contributor

Fixed an error in the listen() function :

  • The first statement of the listen() function initializes a ticker, but it serves no purpose. There is no processing in the loop that follows.

  • The loop that follows is intended to accept connections in a loop and create a new connection, but this loop is closed as soon as an error occurs. The return causes the goroutine to exit, and thus the listener to close. Instead, you should continue accepting connections, and if an error occurs, display an error message and move on to the next connection.

Fixed an error in the listen() function
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.

1 participant