mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
partially reverted b924eba1ac
The timeouts were reset to the original values.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user