Skip to content
Snippets Groups Projects
Commit a839a6f0 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix last commit.

If we called accept(), it's not datagram, and if you're using SCTP
and Synchronet lies to you, you can fix it yourself.
parent 5ac2c66c
No related branches found
No related tags found
No related merge requests found
Pipeline #8109 passed
......@@ -871,12 +871,8 @@ js_accept(JSContext *cx, uintN argc, jsval *arglist)
}
new_p->type = p->type;
if (new_p->type == 0) {
union xp_sockaddr addr;
socklen_t len = sizeof(addr);
if (getsockname(new_socket, &addr.addr, &len) == 0)
new_p->type = addr.addr.sa_family;
}
if (new_p->type == 0)
new_p->type = SOCK_STREAM;
new_p->debug = p->debug;
new_p->nonblocking = p->nonblocking;
new_p->external = false; /* let destructor close socket */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment