mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
Active session timeout was reduced to 30 secs.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user