George Joseph
f9a38e1608
res_http_websocket: Add timeout to client handshakes.
...
The websocket client proxy and server handshakes use ast_iostream_gets which
are blocking calls. If the outgoing connection succeeds at the TCP or TLS
layer but the proxy (if configured) or the websocket server fails to respond
to the CONNECT or GET requests, the process can hang indefinitely and escalate
to a deadlock. To address this, the handshakes are now guarded with calls to
ast_iostream_set_timeout_sequence() with the timeout set to the client's
(connection_timeout * 2) milliseconds.
In order to use ast_iostream_set_timeout_sequence(), the iostream has to be
set to non-blocking with ast_iostream_nonblock() but there was no way to
reset the stream back to blocking mode so a new API ast_iostream_blocking()
was added for it.
Tracing was also enabled in the websocket_client_handshake function for
future troubleshooting.
Resolves : #1979
2026-06-16 14:17:49 +00:00
..
2025-02-20 21:46:35 +00:00
2026-06-01 16:08:02 +00:00
2025-02-20 21:46:35 +00:00
2025-02-20 21:46:35 +00:00
2026-02-18 13:43:42 +00:00
2025-02-20 21:46:35 +00:00
2023-12-08 13:11:54 +00:00
2023-04-03 07:58:23 -05:00
2025-02-20 21:46:35 +00:00
2023-12-08 13:11:54 +00:00
2026-06-11 18:31:03 +00:00
2023-01-13 08:32:33 -06:00
2020-06-02 11:35:07 -05:00
2024-09-25 18:27:20 +00:00
2025-02-20 21:46:35 +00:00
2021-12-02 15:02:09 -06:00
2025-02-20 21:46:35 +00:00
2019-09-23 07:35:48 -04:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2025-09-11 14:47:39 +00:00
2024-09-09 23:17:20 +00:00
2026-02-18 19:30:18 +00:00
2021-12-02 15:02:09 -06:00
2025-11-12 22:10:51 +00:00
2025-02-20 21:46:35 +00:00
2021-12-02 15:02:09 -06:00
2026-06-03 22:54:50 +00:00
2025-01-16 15:32:54 +00:00
2026-03-31 16:55:05 +00:00
2026-02-18 13:43:42 +00:00
2025-08-06 15:37:52 +00:00
2026-03-02 16:43:30 +00:00
2026-06-03 22:54:50 +00:00
2026-06-03 22:54:50 +00:00
2026-06-03 22:54:50 +00:00
2025-11-12 21:27:24 +00:00
2026-01-23 15:25:43 +00:00
2025-07-01 14:02:39 +00:00
2026-01-23 15:25:43 +00:00
2025-11-12 21:27:24 +00:00
2026-01-13 16:03:31 +00:00
2025-10-06 15:46:30 +00:00
2024-02-12 18:46:32 +00:00
2025-10-02 14:43:06 +00:00
2026-02-18 13:43:42 +00:00
2022-03-23 17:13:03 -05:00
2025-12-01 14:06:00 +00:00
2025-12-01 14:06:00 +00:00
2021-12-02 15:02:09 -06:00
2020-04-15 13:56:40 -05:00
2022-07-07 08:19:14 -05:00
2025-02-20 21:46:35 +00:00
2025-10-22 15:47:21 +00:00
2025-12-29 19:37:38 +00:00
2026-05-19 21:11:33 +00:00
2026-02-18 13:43:42 +00:00
2026-05-19 21:11:33 +00:00
2020-06-10 09:33:28 -05:00
2021-12-02 15:02:09 -06:00
2021-12-02 10:37:38 -06:00
2020-04-28 13:05:55 -05:00
2025-02-20 21:46:35 +00:00
2024-10-10 15:34:31 +00:00
2026-03-03 22:07:26 +00:00
2026-01-05 14:46:27 +00:00
2026-01-05 14:46:27 +00:00
2026-02-17 13:31:31 +00:00
2026-02-18 13:43:42 +00:00
2024-08-12 15:21:35 +00:00
2026-06-11 18:31:03 +00:00
2026-06-11 18:31:03 +00:00
2026-06-11 18:31:03 +00:00
2025-02-20 21:46:35 +00:00
2025-09-22 17:39:24 +00:00
2026-03-03 21:51:53 +00:00
2025-02-20 21:46:35 +00:00
2024-02-12 18:46:32 +00:00
2021-12-02 15:02:09 -06:00
2021-01-04 05:00:58 -06:00
2024-02-12 18:46:32 +00:00
2025-05-20 13:54:08 +00:00
2026-02-25 13:25:21 +00:00
2021-11-15 17:33:27 -06:00
2026-03-05 12:52:43 +00:00
2024-02-12 18:46:32 +00:00
2024-02-12 18:46:32 +00:00
2021-12-02 15:02:09 -06:00
2026-06-16 14:17:49 +00:00
2025-04-02 12:16:41 +00:00
2025-07-30 16:04:01 +00:00
2025-01-29 14:18:25 +00:00
2020-10-02 12:58:18 -05:00
2025-01-29 14:18:25 +00:00
2026-02-18 13:43:42 +00:00
2026-04-07 17:18:45 +00:00
2025-01-29 14:18:25 +00:00
2025-10-20 13:19:22 +00:00
2025-02-20 21:46:35 +00:00
2025-01-29 14:18:25 +00:00
2026-05-11 12:53:16 +00:00
2025-04-21 13:29:33 +00:00
2021-12-02 15:02:09 -06:00
2025-02-20 21:46:35 +00:00
2021-12-02 15:02:09 -06:00
2025-01-29 14:18:25 +00:00
2021-12-02 10:37:38 -06:00
2025-07-30 16:04:01 +00:00
2026-03-03 18:55:56 +00:00
2025-09-04 15:03:45 +00:00
2026-04-22 17:50:32 +00:00
2021-12-02 15:02:09 -06:00
2021-08-06 09:04:28 -05:00
2026-06-11 18:31:03 +00:00
2021-12-02 15:02:09 -06:00
2026-02-18 13:43:42 +00:00
2026-06-11 18:31:03 +00:00
2025-02-20 21:46:35 +00:00
2025-07-30 16:04:01 +00:00
2025-01-29 14:18:25 +00:00
2025-02-11 22:05:28 +00:00
2026-05-06 12:29:42 +00:00
2026-02-25 13:25:21 +00:00
2022-01-21 10:06:57 -06:00
2025-01-29 14:18:25 +00:00
2025-09-16 17:21:30 +00:00
2025-09-16 17:21:30 +00:00
2021-12-02 15:02:09 -06:00
2021-11-15 17:33:27 -06:00
2025-09-30 13:50:37 +00:00
2021-12-02 15:02:09 -06:00
2026-06-03 22:54:50 +00:00
2021-11-18 14:46:42 -06:00
2026-06-03 22:54:50 +00:00
2025-01-29 14:18:25 +00:00
2025-10-13 15:34:18 +00:00
2023-06-09 18:19:53 +00:00
2022-05-09 08:20:46 -05:00
2025-01-29 14:18:25 +00:00
2026-06-11 18:31:03 +00:00
2026-02-26 15:51:08 +00:00
2024-10-17 15:20:44 +00:00
2025-06-02 16:35:34 +00:00
2025-02-20 21:46:35 +00:00
2025-12-16 17:03:49 +00:00
2026-02-18 13:43:42 +00:00
2026-06-09 14:23:06 +00:00
2021-12-02 15:02:09 -06:00
2021-09-08 19:10:54 -05:00
2025-01-02 14:52:18 +00:00
2025-12-04 16:13:08 +00:00
2022-03-24 12:00:58 -05:00
2026-04-22 19:02:40 +00:00
2025-02-20 21:46:35 +00:00
2023-11-14 20:51:40 +00:00
2023-03-01 09:50:02 -06:00
2026-02-25 13:25:21 +00:00
2021-12-02 15:02:09 -06:00
2026-02-26 15:51:08 +00:00
2026-03-19 16:41:30 +00:00