Added session timeouts.

The parameter 'connection_timeout' for services takes a value as seconds.
All sessions that have been idle for longer than this will be disconnected.
This commit is contained in:
Markus Makela
2015-02-20 22:16:43 +02:00
parent 3145ebac43
commit c47d2f3791
14 changed files with 101 additions and 4 deletions

View File

@ -170,6 +170,9 @@ int gw_read_backend_handshake(
if ((n = dcb_read(dcb, &head)) != -1)
{
dcb->last_read = hkheartbeat;
if (head)
{
payload = GWBUF_DATA(head);
@ -420,6 +423,8 @@ int gw_receive_backend_auth(
n = dcb_read(dcb, &head);
dcb->last_read = hkheartbeat;
/*<
* Read didn't fail and there is enough data for mysql packet.
*/