Problem
RemoterTls overrides Remoter.receive() and Remoter.send() for TLS-specific nonblocking errors but omits the idle-timer refresh performed by the corresponding plain TCP methods.
With a nonzero idle timeout, successful TLS application traffic leaves the deadline unchanged. An active TLS connection can therefore be closed as idle.
Reproduction
Against current main, extend the existing test_tcp_tls_default_context test after obtaining ixBeta:
ixBeta.tymeout = 1.0
remaining = []
ixBeta.tymer.start(duration=ixBeta.tymeout)
tymist.tick(tock=0.75)
# Existing client-to-server transfer
remaining.append(ixBeta.tymer.remaining)
ixBeta.tymer.start(duration=ixBeta.tymeout)
tymist.tick(tock=0.75)
# Existing server-to-client transfer
remaining.append(ixBeta.tymer.remaining)
assert remaining == pytest.approx([1.0, 1.0])
Run:
pytest -q tests/core/tcp/test_tcp.py::test_tcp_tls_default_context
Current result:
Obtained: [0.25, 0.25]
Expected: [1.0, 1.0]
The test configures the accepted remoter timer directly to isolate this defect from server timeout propagation.
Expected behavior
RemoterTls should mirror Remoter:
- Refresh after receiving nonempty application data.
- Refresh after sending a nonzero byte count.
- Do not refresh for blocked I/O, EOF, errors, or zero-byte sends.
- Honor
refreshable=False.
Refreshing must reset the deadline relative to current scheduler tyme, as addressed by #169.
Related work
Problem
RemoterTlsoverridesRemoter.receive()andRemoter.send()for TLS-specific nonblocking errors but omits the idle-timer refresh performed by the corresponding plain TCP methods.With a nonzero idle timeout, successful TLS application traffic leaves the deadline unchanged. An active TLS connection can therefore be closed as idle.
Reproduction
Against current
main, extend the existingtest_tcp_tls_default_contexttest after obtainingixBeta:Run:
Current result:
The test configures the accepted remoter timer directly to isolate this defect from server timeout propagation.
Expected behavior
RemoterTlsshould mirrorRemoter:refreshable=False.Refreshing must reset the deadline relative to current scheduler tyme, as addressed by #169.
Related work