DLLIST_PREPEND(&clients, client);
clients_count++;
- client->to_idle_disconnect =
- timeout_add(CLIENT_LOGIN_IDLE_TIMEOUT_MSECS,
+ client->to_disconnect =
+ timeout_add(CLIENT_LOGIN_TIMEOUT_MSECS,
client_idle_disconnect_timeout, client);
client_open_streams(client);
if (client->io != NULL)
io_remove(&client->io);
- if (client->to_idle_disconnect != NULL)
- timeout_remove(&client->to_idle_disconnect);
+ if (client->to_disconnect != NULL)
+ timeout_remove(&client->to_disconnect);
if (client->to_auth_waiting != NULL)
timeout_remove(&client->to_auth_waiting);
if (client->auth_response != NULL)
return TRUE;
default:
/* something was read */
- timeout_reset(client->to_idle_disconnect);
return TRUE;
}
}
SASL authentication gives the largest output. */
#define LOGIN_MAX_OUTBUF_SIZE 4096
-/* Disconnect client after idling this many milliseconds */
-#define CLIENT_LOGIN_IDLE_TIMEOUT_MSECS (3*60*1000)
+/* Disconnect client after this many milliseconds if it hasn't managed
+ to log in yet. */
+#define CLIENT_LOGIN_TIMEOUT_MSECS (3*60*1000)
#define AUTH_SERVER_WAITING_MSG \
"Waiting for authentication process to respond.."
struct ostream *output;
struct io *io;
struct timeout *to_auth_waiting;
- struct timeout *to_idle_disconnect;
+ struct timeout *to_disconnect;
unsigned char *master_data_prefix;
unsigned int master_data_prefix_len;