Skip to content

Commit ab862c4

Browse files
committed
picoev: add -d support_wsl1 (workaround #22493)
1 parent 0cf3a44 commit ab862c4

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

vlib/picoev/socket_util.c.v

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,13 @@ fn listen(config Config) !int {
123123
// epoll socket options
124124
net.socket_error(C.setsockopt(fd, C.SOL_SOCKET, C.SO_REUSEPORT, &flag, sizeof(int)))!
125125
net.socket_error(C.setsockopt(fd, C.IPPROTO_TCP, C.TCP_QUICKACK, &flag, sizeof(int)))!
126-
net.socket_error(C.setsockopt(fd, C.IPPROTO_TCP, C.TCP_DEFER_ACCEPT, &config.timeout_secs,
127-
sizeof(int)))!
128-
queue_len := max_queue
129-
net.socket_error(C.setsockopt(fd, C.IPPROTO_TCP, C.TCP_FASTOPEN, &queue_len, sizeof(int)))!
126+
$if !support_wsl1 ? {
127+
net.socket_error(C.setsockopt(fd, C.IPPROTO_TCP, C.TCP_DEFER_ACCEPT, &config.timeout_secs,
128+
sizeof(int)))!
129+
queue_len := max_queue
130+
net.socket_error(C.setsockopt(fd, C.IPPROTO_TCP, C.TCP_FASTOPEN, &queue_len,
131+
sizeof(int)))!
132+
}
130133
}
131134

132135
// addr settings

0 commit comments

Comments
 (0)