TsgcWSRateLimiter › Methods › UnregisterConnection
Removes a connection from tracking (called automatically on disconnect).
procedure UnregisterConnection(const aIP: string);
| Name | Type | Description |
|---|---|---|
aIP | const string | IP address of the client whose connection is being removed from tracking. Must match the value passed to the matching RegisterConnection call. |
Removes the IP from the internal connection-tracking table and decrements the ActiveKeys counter exposed through Stats. Called automatically on disconnect by the built-in server integration. Call it manually only from custom transport code that registered the connection itself — failing to unregister eventually produces a stale ActiveKeys value and may trip the connection-rate limits even though no client is actually connected.
procedure TForm1.ServerDisconnect(Connection: TsgcWSConnection);
begin
sgcWSRateLimiter1.UnregisterConnection(Connection.PeerIP);
end;