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

fix: Bind socket during constructor #14

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

Hansanto
Copy link
Contributor

Context

Discord discussion

After #11, the serverSocket was instantiated and bound during the first call of the listen method. However, this creates inconsistency due to concurrency in some tests for developers.

The idea is to bind the socket during the initialization of the constructor to have the same behavior as before

@Hansanto Hansanto marked this pull request as ready for review October 21, 2024 11:41
Comment on lines +41 to +43
// Since Ktor 3.0.0, "bind" is a suspend function
// https://youtrack.jetbrains.com/issue/KTOR-7605
// We need to call "bind" during the constructor to keep the same behavior as before
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 nice comment

Copy link
Collaborator

@martinbonnin martinbonnin left a comment

Choose a reason for hiding this comment

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

I tested locally with apollographql/apollo-kotlin#6214 and it's all good ✅.
Thanks again for diving into this 🙏 . I'll give it the day to double check everything is good and make a new release tomorrow.

@martinbonnin martinbonnin merged commit 4df32ac into apollographql:main Oct 22, 2024
2 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.

2 participants