| blib/lib/PAGI/Middleware/WebSocket/RateLimit.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| branch | 15 | 24 | 62.5 |
| line | true | false | branch |
|---|---|---|---|
| 96 | 1 | 3 | if ($scope->{'type'} ne "websocket") |
| 119 | 2 | 3 | if $msg_tokens > $msg_limit * $burst |
| 122 | 5 | 0 | if $byte_tokens > $byte_limit * $burst |
| 127 | 0 | 5 | if $closed |
| 132 | 0 | 6 | if $closed |
| 133 | 1 | 5 | if $event->{'type'} ne "websocket.receive" |
| 142 | 1 | 4 | if ($msg_tokens < 1) |
| 146 | 0 | 1 | if ($should_close) |
| 155 | 0 | 4 | if ($byte_tokens < $size) |
| 159 | 0 | 0 | if ($should_close) |
| 194 | 1 | 0 | if ($self->{'on_limit_exceeded'}) |
| 198 | 0 | 1 | if ($should_close) |