TsgcHTTP2Client › Events › OnHTTP2Disconnect
Fires when the HTTP/2 connection has been closed.
property OnHTTP2Disconnect: TsgcHTTP2ClientDisconnectEvent;
// TsgcHTTP2ClientDisconnectEvent = procedure(Sender: TObject; const Connection: TsgcHTTP2ConnectionClient) of object
—
OnHTTP2Disconnect is raised after the HTTP/2 connection has been closed, either because the application called Close or Disconnect, the server sent a GoAway and the connection terminated, the socket dropped unexpectedly, or the TLS layer was torn down. Use this event to release per-connection resources and to log the disconnection. If WatchDog is enabled the client will attempt to reconnect automatically after the event returns, and OnHTTP2PendingRequests is raised too when there are queued requests so the application can decide whether to retry them.
procedure OnHTTP2DisconnectEvent(Sender: TObject; const Connection: TsgcHTTP2ConnectionClient);
begin
Log('HTTP/2 connection closed');
end;