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

Temporary handler doesn't remove context #69

Closed
@Katsute

Description

@Katsute

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.01

Issue

Explain your issue. Add any screenshots here
Temporary handler will not remove context from the SimpleHttpServer#getContexts() map, only the HttpServer.
Temporary handler also does not remove itself after time passed until a connection happens.

Expected Behavior

Explain what was supposed to happen
Temporary handler should remove in both instances (may require optional simplehttpserver parameter to handle).
Temporary handler should remove at the time instance.

Steps To Reproduce

Explain how and/or when the error occurred

@Override
public final void handle(final HttpExchange exchange) throws IOException{
if(!hasExpiry || System.currentTimeMillis() < expiry)
handler.handle(exchange);
exchange.getHttpContext().getServer().removeContext(exchange.getHttpContext());
exchange.close();
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions