TsgcHTTP2Client › Events › OnHTTP2PendingRequests
Fires after a disconnection when there are pending requests so the application can reconnect or clear the queue.
property OnHTTP2PendingRequests: TsgcHTTP2ClientPendingRequestsEvent;
// TsgcHTTP2ClientPendingRequestsEvent = procedure(Sender: TObject; const Connection: TsgcHTTP2ConnectionClient; var aReconnect, aClear: Boolean) of object
—
OnHTTP2PendingRequests is raised right after the HTTP/2 connection has been lost when there are still requests queued that have not been sent or whose response has not been received. Set aReconnect to True to instruct the client to reopen the connection automatically and resend the pending requests, or False to leave the queue in place so it can be flushed manually later. Set aClear to True to drop the pending requests instead of retrying them; this is useful when the payload has expired or the caller has timed out. If the event is not handled both flags default to False and the pending requests remain queued.
procedure OnHTTP2PendingRequestsEvent(Sender: TObject; const Connection: TsgcHTTP2ConnectionClient;
var aReconnect, aClear: Boolean);
begin
aReconnect := True;
aClear := False;
end;