We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c802c87 commit 1a4dec8Copy full SHA for 1a4dec8
playwright/src/main/java/com/microsoft/playwright/impl/Router.java
@@ -50,6 +50,10 @@ boolean handle(Route route) {
50
handler.accept(route);
51
return true;
52
}
53
+
54
+ boolean isDone() {
55
+ return times != null && times <= 0;
56
+ }
57
58
59
void add(UrlMatcher matcher, Consumer<Route> handler, Integer times) {
@@ -69,6 +73,9 @@ int size() {
69
73
boolean handle(Route route) {
70
74
for (RouteInfo info : routes) {
71
75
if (info.handle(route)) {
76
+ if (info.isDone()) {
77
+ routes.remove(info);
78
72
79
80
81
0 commit comments