From: Ji-hoon Lee Date: Fri, 1 Oct 2021 10:07:20 +0000 (+0900) Subject: Make lws_create_context() to fail if unable to bind X-Git-Tag: submit/tizen_6.0/20211005.084111~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9834397a3d3c0c8edb7310dd07ae6a1d1eba3061;p=platform%2Fcore%2Fuifw%2Flibscl-core.git Make lws_create_context() to fail if unable to bind If libwebsocket fails to bind as shown below, the lws_context should not be created at all in order to retry again. websocket.cpp: log_func(389) > LEVEL : 1 , ERROR on binding fd 103 to port 7681 (-1 98) websocket.cpp: log_func(389) > LEVEL : 1 , VH default: iface (null) port 7681 DOESN'T EXIST Change-Id: I781420d4ed5c3daef01a9e4b05acf2024f2b9683 --- diff --git a/src/legacy_support/websocket.cpp b/src/legacy_support/websocket.cpp index 2ae2565..f177fbf 100644 --- a/src/legacy_support/websocket.cpp +++ b/src/legacy_support/websocket.cpp @@ -449,7 +449,7 @@ bool CWebHelperAgentWebSocket::init() info.ssl_private_key_filepath = NULL; info.gid = -1; info.uid = -1; - info.options = 0; + info.options = LWS_SERVER_OPTION_FAIL_UPON_UNABLE_TO_BIND; ecore_init();