Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Throttled Handler doesn't delete failed handle connections #88

Closed
1 task done
Katsute opened this issue Aug 11, 2020 · 0 comments
Closed
1 task done

Throttled Handler doesn't delete failed handle connections #88

Katsute opened this issue Aug 11, 2020 · 0 comments
Assignees
Labels
bug Something isn't working as expected

Comments

@Katsute
Copy link
Member

Katsute commented Aug 11, 2020

Prerequisites

If all checks are not passed then the issue will be closed

  • I have checked that no other similar issue already exists

Operating System: Operating system name and version
Windows 10

Release Version: Release version or branch where the issue occurred
03.05.06

Issue

Explain your issue. Add any screenshots here

If an exception is thrown in #handle the connection will not be deleted, despite being handled. This can cause ghost connections.

@Override
public final void handle(final HttpExchange exchange) throws IOException{
if(throttler.addConnection(exchange)){
handler.handle(exchange);
throttler.deleteConnection(exchange);
}else{
exchange.close();
}
}

Expected Behavior

Explain what was supposed to happen

Connections should be deleted after handle (use a try finally).

Steps To Reproduce

Explain how and/or when the error occurred

Throw an exception in throttled handler.

@Katsute Katsute added the bug Something isn't working as expected label Aug 11, 2020
@Katsute Katsute self-assigned this Aug 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

1 participant