src/vs/base/parts/ipc/common/ipc.net.ts/PersistentProtocol/_recvAckCheck
class PersistentProtocol:	private _recvAckCheck(): void {
		if (this._outgoingMsgId <= this._outgoingAckId) {
			// everything has been acknowledged
			return;
		}

		if (this._outgoingAckTimeout) {
			// there will be a check in the near future
			return;
		}

		if (this._isReconnecting) {
			// do not cause a timeout during reconnection,
			// because messages will not be actually written until `endAcceptReconnection`
			return;
		}

		const oldestUnacknowledgedMsg = this._outgoingUnackMsg.peek()!;
		const timeSinceOldestUnacknowledgedMsg = Date.now() - oldestUnacknowledgedMsg.writtenTime;
		const timeSinceLastReceivedSomeData = Date.now() - this._socketReader.lastReadTime;
		const timeSinceLastTimeout = Date.now() - this._lastSocketTimeoutTime;

		if (
			timeSinceOldestUnacknowledgedMsg >= ProtocolConstants.TimeoutTime
			&& timeSinceLastReceivedSomeData >= ProtocolConstants.TimeoutTime
			&& timeSinceLastTimeout >= ProtocolConstants.TimeoutTime
		) {
			// It's been a long time since our sent message was acknowledged
			// and a long time since we received some data

			// But this might be caused by the event loop being busy and failing to read messages
			if (!this._loadEstimator.hasHighLoad()) {
				// Trash the socket
				this._lastSocketTimeoutTime = Date.now();
				this._onSocketTimeout.fire(undefined);
				return;
			}
		}

		const minimumTimeUntilTimeout = Math.max(
			ProtocolConstants.TimeoutTime - timeSinceOldestUnacknowledgedMsg,
			ProtocolConstants.TimeoutTime - timeSinceLastReceivedSomeData,
			ProtocolConstants.TimeoutTime - timeSinceLastTimeout,
			500
		);

		this._outgoingAckTimeout = setTimeout(() => {
			this._outgoingAckTimeout = null;
			this._recvAckCheck();
		}, minimumTimeUntilTimeout);
	}