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/20211005.084014~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F69%2F264869%2F1;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/websocket.cpp b/src/websocket.cpp index 2ae2565..f177fbf 100644 --- a/src/websocket.cpp +++ b/src/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();