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

Commit c3925d5

Browse files
committed
backward compat
1 parent 7b0ebeb commit c3925d5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/com/kttdevelopment/simplehttpserver/handler/ConnectionThrottler.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.kttdevelopment.simplehttpserver.handler;
22

3+
import com.kttdevelopment.simplehttpserver.HttpSession;
34
import com.kttdevelopment.simplehttpserver.SimpleHttpServer;
45
import com.sun.net.httpserver.HttpExchange;
56

@@ -8,19 +9,19 @@
89

910
public class ConnectionThrottler {
1011

11-
private final SimpleHttpServer server;
12+
private final HttpSession server;
1213

1314
private final Predicate<HttpExchange> contributeToLimit;
1415
private final AtomicInteger connections = new AtomicInteger(0);
1516

1617
private int maxConnections = 0;
1718

18-
public ConnectionThrottler(final SimpleHttpServer server){
19+
public ConnectionThrottler(final HttpSession server){
1920
this.server = server;
2021
contributeToLimit = (exchange) -> true;
2122
}
2223

23-
public ConnectionThrottler(final SimpleHttpServer server, final Predicate<HttpExchange> counts){
24+
public ConnectionThrottler(final HttpSession server, final Predicate<HttpExchange> counts){
2425
this.server = server;
2526
this.contributeToLimit = counts;
2627
}

0 commit comments

Comments
 (0)