Improve: Increase UDP knock timeout from 5s to 30s
The 5-second timeout for UDP handshake (knock) was too short for some network conditions. Increased to 30 seconds for better reliability. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Binary file not shown.
+2
-2
@@ -91,9 +91,9 @@ int setup_udp_session(int tcp_fd, int *udp_fd_out, struct sockaddr_in *client_ud
|
||||
|
||||
printf("UDP port bound to %u. Waiting for knock with Session ID: %lu...\n", udp_port, (unsigned long)session_id);
|
||||
|
||||
// Timeout of 5s for the UDP knock
|
||||
// Timeout of 30s for the UDP knock (more reasonable for variable networks)
|
||||
struct timeval tv;
|
||||
tv.tv_sec = 5;
|
||||
tv.tv_sec = 30;
|
||||
tv.tv_usec = 0;
|
||||
setsockopt(udp_fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user