Active session timeout was reduced to 30 secs.

This commit is contained in:
Nikos Mavrogiannopoulos
2014-04-21 14:08:50 +02:00
parent d090075502
commit 2c213d4e52

View File

@@ -48,6 +48,8 @@
# include <sys/mman.h>
#endif
#define ACTIVE_SESSION_TIMEOUT 30
int handle_worker_commands(struct worker_st *ws)
{
struct iovec iov[3];
@@ -132,7 +134,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 < 60) {
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;