partially reverted b924eba1ac

The timeouts were reset to the original values.
This commit is contained in:
Nikos Mavrogiannopoulos
2014-11-15 10:21:24 +01:00
parent 845562201a
commit 79668eb5e5
3 changed files with 3 additions and 2 deletions

View File

@@ -658,7 +658,7 @@ void request_reload(int signo)
/* A UDP fd will not be forwarded to worker process before this number of
* seconds has passed. That is to prevent a duplicate message messing the worker.
*/
#define UDP_FD_RESEND_TIME 35
#define UDP_FD_RESEND_TIME 60
#define RECORD_PAYLOAD_POS 13
#define HANDSHAKE_SESSION_ID_POS 46

View File

@@ -132,7 +132,7 @@ int handle_worker_commands(struct worker_st *ws)
if (hello == 0) {
/* only replace our session if we are inactive for more than 60 secs */
if ((ws->udp_state != UP_ACTIVE && ws->udp_state != UP_INACTIVE) ||
time(0) - ws->last_msg_udp < UDP_SWITCH_TIME) {
time(0) - ws->last_msg_udp < ACTIVE_SESSION_TIMEOUT) {
oclog(ws, LOG_INFO, "received UDP fd message but our session is active!");
close(fd);
return 0;

View File

@@ -283,5 +283,6 @@ int send_msg_to_main(worker_st *ws, uint8_t cmd,
* TCP (if activity occurs there).
*/
#define UDP_SWITCH_TIME 15
#define ACTIVE_SESSION_TIMEOUT 30
#endif