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

Close any open message base after input timeout (5 minutes)

As Nelgin pointed out, the nntpservice can leave a message bases open while
a client is idle. Normally, an inactive client would be disconnected after 5
minutes of inactivity, so that wouldn't be much of an issue. However, if
authenticated as a user with the H-exemption, no auto-disconnection after
input timeout would happen. So let's close any open message base for good
measure.

The input/receive timeout probably should be configurable and lowered to
a smaller duration (one minute?). I'll leave that for another commit.
parent 20cfdb18
No related branches found
No related tags found
No related merge requests found
......@@ -199,6 +199,8 @@ while(client.socket.is_connected && !quit) {
cmdline = client.socket.recvline(1024 /*maxlen*/, 300 /*timeout*/);
if(cmdline==null) {
if(msgbase && msgbase.is_open)
msgbase.close();
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