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

make cross-platform EADDRINUSE check #116

Merged
merged 3 commits into from
Nov 6, 2024
Merged

Conversation

KevRiver
Copy link
Contributor

@KevRiver KevRiver commented Nov 2, 2024

Summary of Works

  1. add new package errors under the internal package.
  2. create two files errors_unix.go and errors_windows.go and define function IsSocketInUse in each file.
  3. add build constraint go:build !windows to errors_unix.go and go:build windows to errors_windows.go.
    the function isEADDRINUSE now works on Windows

@aybabtme
Copy link
Collaborator

aybabtme commented Nov 3, 2024

@KevRiver did you get a chance to test this on Windows by any chance? also can you un-comment windows from the build matrix in b7110ad

@aybabtme aybabtme merged commit 98a2250 into humanlogio:master Nov 6, 2024
6 checks passed
@aybabtme
Copy link
Collaborator

aybabtme commented Nov 6, 2024

thanks @KevRiver !

@aybabtme
Copy link
Collaborator

aybabtme commented Nov 6, 2024

oups i forgot about the test you were writing for the socket-reuse check. can you make another PR with it?

@KevRiver
Copy link
Contributor Author

KevRiver commented Nov 6, 2024

sure. I'll make the test today and send another PR

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.

2 participants