Skip to content
Snippets Groups Projects
Commit 3f0bbb17 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Close an open message base after just 10 seconds of client inactivity

... and log a debug-level log message when doing so.

The current input/receive timeout duration (5 minutes) might be a bit long to
leave a message base open (though, there's no known issue with doing so). For
example, when users read message bases using the terminal server, they can sit
for much longer than 5 minutes reading an open message base.
parent 04340d91
No related branches found
No related tags found
No related merge requests found
......@@ -196,11 +196,14 @@ while(client.socket.is_connected && !quit) {
}
// Get Request
cmdline = client.socket.recvline(1024 /*maxlen*/, 300 /*timeout*/);
cmdline = client.socket.recvline(/* maxlen: */1024, /* timeout: */(msgbase && msgbase.is_open) ? 10 : 300);
if(cmdline==null) {
if(msgbase && msgbase.is_open)
if(msgbase && msgbase.is_open) {
log(LOG_DEBUG, "Closing open message base (" + file_getname(msgbase.file) + ") due to client inactivity");
msgbase.close();
continue;
}
if(client.socket.is_connected) {
if(user.security.exemptions&UFLAG_H)
continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment