mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
coverity 83656 server check setsockopt return
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
abb48113e7
commit
f38e7860f4
1 changed files with 3 additions and 2 deletions
|
@ -57,8 +57,9 @@ int lws_context_init_server(struct lws_context_creation_info *info,
|
|||
/*
|
||||
* allow us to restart even if old sockets in TIME_WAIT
|
||||
*/
|
||||
setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR,
|
||||
(const void *)&opt, sizeof(opt));
|
||||
if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR,
|
||||
(const void *)&opt, sizeof(opt)) < 0)
|
||||
return 1;
|
||||
|
||||
lws_plat_set_socket_options(context, sockfd);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue