Flag the client for disconnection if it is idle past the timeout or a global disconnect is requested.

Synopsis

Declared in <httpserver.h>

bool
MaybeDisconnect(
    std::chrono::time_point<SteadyClock> now,
    std::chrono::seconds rpcservertimeout,
    bool disconnect_all);

Return Value

true if the client was flagged for disconnection.

Parameters

Name

Description

now

The current time used to evaluate the idle timeout.

rpcservertimeout

Idle duration after which the client should be disconnected.

disconnect_all

Whether all clients are being disconnected during shutdown.

Created with MrDocs