We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b5e77c commit 6c7ba2aCopy full SHA for 6c7ba2a
httpev.ml
@@ -561,7 +561,11 @@ let listen ~name ?(backlog=100) ?(reuseport=false) addr =
561
let fd = socket ~cloexec:true domain SOCK_STREAM 0 in
562
try
563
setsockopt fd SO_REUSEADDR true;
564
- if reuseport then U.setsockopt fd SO_REUSEPORT true;
+ begin match domain, reuseport with
565
+ | PF_UNIX, true -> log #warn "TCP.listen %s : reuseport doesn't make sense for unix socket, ignoring" (Nix.show_addr addr)
566
+ | PF_INET, true -> U.setsockopt fd SO_REUSEPORT true
567
+ | _ -> ()
568
+ end;
569
bind fd addr;
570
listen fd backlog;
571
log #info "%s listen TCP %s" name (Nix.show_addr addr);
0 commit comments