Closed ksysoev closed 1 month ago
Attention: Patch coverage is 89.28571%
with 3 lines
in your changes are missing coverage. Please review.
Project coverage is 90.63%. Comparing base (
51aea57
) to head (25bdd6b
).
Files | Patch % | Lines |
---|---|---|
channel/channel.go | 57.14% | 3 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This pull request adds the ability to limit the number of active WebSocket connections in the ConnectionRegistry. It introduces a new method,
CanAccept()
, which checks if the registry can accept new connections based on the specified connection limit. If the connection limit is reached, a "Connection limit reached" error message is returned. TheAddConnection()
method has been updated to check the connection limit before adding a new connection. Additionally, a new option,WithConnectionLimit()
, has been added to set the maximum number of connections that can be accepted by the ConnectionRegistry.