check udp timeouts on all new connections including TCP

This commit is contained in:
Yves Rűtschlé committed 2025-08-15 19:54:51 +02:00
1 parent b57b333a39
commit 81e2d0e2f4
3 files changed
+3 -2

No files matched your search

+2
View File
@@ -99,6 +99,8 @@ struct connection* cnx_accept_process(struct loop_info* fd_info, struct listen_e
int type = listen_socket->type;
struct connection* cnx;
udp_timeouts(fd_info);
switch (type) {
case SOCK_STREAM:
cnx = accept_new_connection(listen_socket, fd_info);
-2
View File
@@ -271,8 +271,6 @@ struct connection* udp_c2s_forward(int sockfd, struct loop_info* fd_info)
malloc/free overhead for each packet, when really 64K is not that much */
udp_timeouts(fd_info);
addrlen = sizeof(src_addr);
len = recvfrom(sockfd, data, sizeof(data), 0, (struct sockaddr*) &src_addr, &addrlen);
if (len < 0) {
+1
View File
@@ -25,5 +25,6 @@ void udp_s2c_forward(struct connection* cnx);
void udp_init(struct loop_info* fd_info);
void udp_tidy(struct connection* cnx, struct loop_info* fd_info);
void udp_timeouts(struct loop_info* fd_info);
#endif /* UDPLISTENER_H */