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:
Theo Tappe
2026-06-24 12:44:13 +02:00
parent 1a9d6fde96
commit 31b8e890d2
3 changed files with 2 additions and 2 deletions
BIN
View File
Binary file not shown.
+2 -2
View File
@@ -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));
BIN
View File
Binary file not shown.