Skip to content

Commit

Permalink
both: remove reuse for client socket
Browse files Browse the repository at this point in the history
  • Loading branch information
liudongmiao committed Jun 12, 2024
1 parent 26b0013 commit 46b82e8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
7 changes: 0 additions & 7 deletions wss-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,17 +371,10 @@ static int update_socket_flag(evutil_socket_t sock) {
LOGW("cannot make socket nonblocking");
return 1;
}

if (evutil_make_socket_closeonexec(sock) < 0) {
LOGW("cannot make socket closeonexec");
return 1;
}

if (evutil_make_listen_socket_reuseable(sock) < 0) {
LOGW("cannot make socket reuseable");
return 1;
}

return 0;
}

Expand Down
4 changes: 0 additions & 4 deletions wss-proxy-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,6 @@ static struct bufferevent *init_udp_client(struct event_base *base, struct raw_s
LOGE("cannot make udp socket closeonexec");
goto error;
}
if (evutil_make_listen_socket_reuseable(sock) < 0) {
LOGE("cannot make udp socket reuseable");
goto error;
}
bev_context_udp = calloc(1, sizeof(struct bev_context_udp));
if (bev_context_udp == NULL) {
LOGE("cannot calloc for udp socket");
Expand Down

0 comments on commit 46b82e8

Please sign in to comment.