]> 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)
committerJoshua Colp <jcolp@sangoma.com>
Wed, 5 Jan 2022 15:41:35 +0000 (09:41 -0600)
commit06f9227ac5c6aa7f282449e3be67030f78727cd4
tree3c44613d3cf88f744a43de10a2cd9643c8ed0eb6
parentdd6df4253410c2c1e09be55ba982a5621ff75d47
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