]> git.ipfire.org Git - thirdparty/asterisk.git/commit
tcptls.c: refactor client connection to be more robust
authorKevin Harwell <kharwell@sangoma.com>
Mon, 15 Nov 2021 22:13:19 +0000 (16:13 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Wed, 5 Jan 2022 15:48:59 +0000 (09:48 -0600)
commit1ddaedeaf5b4307643d347ff8fbf485fbf8e2834
tree71dc43adbc2f1df4d4bae0bbb14ae589f3270901
parentf7c4a3800c82d02cf49da1634bab2e4659115342
tcptls.c: refactor client connection to be more robust

The current TCP client connect code, blocks and does not handle EINTR
error case.

This patch makes the client socket non-blocking while connecting,
ensures a connect does not immediately fail due to EINTR "errors",
and adds a connect timeout option.

The original client start call sets the new timeout option to
"infinite", thus making sure old, orginal behavior is retained.

ASTERISK-29746 #close

Change-Id: I907571843a83e43c0742b95a64785f4411f02671
include/asterisk/tcptls.h
main/tcptls.c