yuanyuanxiang and deepseek-flash
7240879792
Fix: Bound the Linux TLS handshake with a deadline
...
The handshake loop retried SSL_do_handshake on SSL_ERROR_WANT_READ and
nothing else. IOCPClient arms the socket with SO_RCVTIMEO for the
handshake, and a read timeout surfaces as EAGAIN, which OpenSSL reports
as WANT_READ rather than a syscall error. A peer that accepted TCP and
then went silent therefore put the loop into an endless retry: the
handshake never finished, never failed, and logged nothing, while the
main loop sat inside the read. Even SIGTERM could not stop the process,
because the exit flag is only observed between heartbeats.
Observed on a Linux client moving back to 443 when a transfer expired:
frps had the connection ESTABLISHED, the server had sent a partial
flight, the client's Recv-Q was empty and its log stopped dead at the
reconnect line. Reproduced locally against a TCP server that accepts and
never replies: one connection in 75 seconds and no output at all.
Give the whole handshake a 30 second budget, longer than the 15 second
read timeout so a single wake-up still fits, and treat expiry as a
failure the caller can retry. The stalled peer now logs
"[TLS] handshake timed out after Ns (peer silent), aborting" and the
reconnect loop keeps running.
Co-Authored-By: deepseek-flash
2026-11-07 23:04:09 +01:00
..
2026-04-19 22:55:21 +02:00
2026-10-25 14:05:25 +01:00
2026-06-05 00:05:13 +02:00
2026-04-19 22:55:21 +02:00
2026-10-05 10:41:04 +02:00
2026-08-15 11:09:14 +02:00
2026-08-15 11:09:14 +02:00
2026-08-21 19:50:11 +02:00
2026-04-19 22:55:21 +02:00
2026-06-05 00:05:13 +02:00
2026-06-05 00:05:13 +02:00
2026-06-06 13:02:29 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-10-13 17:05:37 +02:00
2026-04-19 22:55:21 +02:00
2026-05-30 00:12:38 +02:00
2026-05-30 00:12:38 +02:00
2026-10-30 11:04:44 +01:00
2026-05-30 00:12:38 +02:00
2026-10-23 11:19:21 +02:00
2026-10-25 14:57:47 +01:00
2026-10-04 19:55:29 +02:00
2026-04-19 22:55:21 +02:00
2026-10-30 17:22:36 +01:00
2026-11-01 20:40:02 +01:00
2026-11-01 20:40:02 +01:00
2026-04-19 22:55:21 +02:00
2026-11-06 17:17:18 +01:00
2026-11-02 14:01:39 +01:00
2026-07-13 19:02:25 +02:00
2026-07-13 19:02:25 +02:00
2026-04-19 22:55:21 +02:00
2026-10-05 10:52:58 +02:00
2026-10-05 10:52:58 +02:00
2026-10-20 21:15:45 +02:00
2026-10-04 18:23:06 +02:00
2026-06-05 00:05:13 +02:00
2026-06-05 00:05:13 +02:00
2026-05-09 23:13:24 +02:00
2026-11-01 20:40:02 +01:00
2026-10-05 10:52:58 +02:00
2026-10-05 10:52:58 +02:00
2026-04-19 22:55:21 +02:00
2026-11-01 20:40:02 +01:00
2026-11-01 20:40:02 +01:00
2026-11-07 14:11:47 +01:00
2026-11-04 14:47:40 +01:00
2026-04-19 22:55:21 +02:00
2026-10-25 17:59:17 +01:00
2026-10-25 17:59:17 +01:00
2026-11-01 20:40:02 +01:00
2026-11-01 20:40:02 +01:00
2026-04-19 22:55:21 +02:00
2026-10-23 11:19:21 +02:00
2026-04-19 22:55:21 +02:00
2026-11-07 21:35:15 +01:00
2026-11-01 20:40:02 +01:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-06-24 22:31:14 +02:00
2026-04-19 22:55:21 +02:00
2026-11-06 17:17:18 +01:00
2026-10-30 22:36:01 +01:00
2026-10-25 02:22:17 +02:00
2026-06-05 00:05:13 +02:00
2026-05-06 19:29:02 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-11-01 20:40:02 +01:00
2026-11-01 20:40:02 +01:00
2026-10-20 21:48:13 +02:00
2026-10-20 21:48:13 +02:00
2026-11-06 17:17:18 +01:00
2026-10-30 22:36:01 +01:00
2026-10-30 22:36:01 +01:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-05-11 20:22:07 +02:00
2026-10-20 13:12:16 +02:00
2026-10-20 13:12:16 +02:00
2026-10-25 17:59:17 +01:00
2026-06-05 00:05:13 +02:00
2026-10-25 17:59:17 +01:00
2026-10-25 17:59:17 +01:00
2026-04-19 22:55:21 +02:00
2026-10-04 19:55:29 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-11-07 09:52:54 +01:00
2026-11-05 18:10:56 +01:00
2026-11-07 14:11:47 +01:00
2026-11-07 14:11:47 +01:00
2026-05-07 18:17:28 +02:00
2026-05-07 18:17:28 +02:00
2026-11-07 14:11:47 +01:00
2026-06-16 21:03:45 +02:00
2026-10-31 18:24:54 +01:00
2026-04-19 22:55:21 +02:00
2026-10-25 17:59:17 +01:00
2026-10-25 17:59:17 +01:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-06-29 22:49:30 +02:00
2026-06-29 22:49:30 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-08-21 19:50:11 +02:00
2026-06-05 00:05:13 +02:00
2026-05-08 12:39:59 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-06-05 00:05:13 +02:00
2026-06-05 00:05:13 +02:00
2026-10-23 12:22:44 +02:00
2026-10-23 12:22:44 +02:00
2026-06-05 00:05:13 +02:00
2026-10-30 23:39:05 +01:00
2026-06-29 22:49:30 +02:00
2026-04-19 22:55:21 +02:00
2026-10-31 18:24:54 +01:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-11-01 20:40:02 +01:00
2026-11-01 20:40:02 +01:00
2026-11-07 23:04:09 +01:00
2026-04-19 22:55:21 +02:00
2026-11-04 14:47:40 +01:00
2026-10-13 17:05:37 +02:00
2026-10-13 17:05:37 +02:00
2026-10-30 19:15:14 +01:00
2026-11-07 14:11:47 +01:00
2026-11-04 14:47:40 +01:00
2026-10-04 21:03:03 +02:00