OctopusDeploy / Halibut

| Public | A secure communication stack for .NET using JSON-RPC over SSL.
Other
12 stars 44 forks source link

Add Polling Service next request timeout #549

Closed LukeButters closed 12 months ago

LukeButters commented 12 months ago

Background

[[SC-59505]]

Adds timeout:

        /// <summary>
        ///     Amount of time the polling service will wait for a request from an RPC call.
        ///     Specifically the amount of time to wait for the first byte of the request to arrive.
        ///
        ///     This value must never be less than the PollingQueueWaitTimeout, of the client, since this
        ///     is the timeout of the long poll the polling service makes to the client to get the next request.
        ///
        ///     Currently set to 10 minutes as that is what the timeout used to be. 
        /// </summary>
        public TimeSpan TcpClientReceiveRequestTimeoutForPolling { get; set; } = TimeSpan.FromMinutes(10);

Which will allow as to reduce the time the polling service will wait for the beginning of a Response message to be received since we know the polling queue will send null messages every 30s if it has no Requests to make. This makes it possible to have the service more readily detect a stalled connection.

This value only makes sense to be set in the polling service.

How to review this PR

Quality :heavy_check_mark:

Pre-requisites

shortcut-integration[bot] commented 12 months ago

This pull request has been linked to Shortcut Story #59505: Polling Tentacle Dequeue Next Timeouts - change from 10 mins.