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

KTOR-2036 Fix CIO connection limit #3140

Merged
merged 3 commits into from Sep 2, 2022
Merged

KTOR-2036 Fix CIO connection limit #3140

merged 3 commits into from Sep 2, 2022

Conversation

e5l
Copy link
Member

@e5l e5l commented Aug 29, 2022

Fix KTOR-2036

@e5l e5l requested a review from rsinukov August 29, 2022 08:26
@e5l e5l self-assigned this Aug 29, 2022
@e5l e5l force-pushed the e5l/fix-cio-connection-limit branch 2 times, most recently from ca58c55 to 4156899 Compare August 30, 2022 07:24
@e5l e5l marked this pull request as ready for review August 30, 2022 08:24
@rsinukov
Copy link
Contributor

Please check CI

@e5l e5l force-pushed the e5l/fix-cio-connection-limit branch from 4156899 to 01c2830 Compare August 31, 2022 08:23
@e5l
Copy link
Member Author

e5l commented Aug 31, 2022

@rsinukov fixed. The test was broken itself

return try {
aSocket(selector).tcpNoDelay().tcp().connect(address, configuration)
} catch (cause: Throwable) {
// a failure or cancellation
semaphore.release()
limit.release()
Copy link
Contributor

Choose a reason for hiding this comment

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

should you release addressLimit here too?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep, thanks

@e5l e5l force-pushed the e5l/fix-cio-connection-limit branch from 01c2830 to 0252f21 Compare September 1, 2022 08:55
@e5l e5l merged commit aab530a into main Sep 2, 2022
@e5l e5l deleted the e5l/fix-cio-connection-limit branch September 2, 2022 08:15
@technoir42
Copy link

@e5l any chance that the fix could be backported to 2.0.x? We are using ktor in a Gradle plugin and cannot update to 2.1.x yet because it needs Kotlin 1.7.

@e5l
Copy link
Member Author

e5l commented Oct 4, 2022

It should be possible to use this version with old Kotlin. Could you check and file an issue if it doesn't work?

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

3 participants