reset timeout if connection is active.
authorCamilo Roca <camilo.roca@intra2net.com>
Thu, 18 Jul 2013 10:04:25 +0000 (12:04 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 19 Jul 2013 07:36:14 +0000 (09:36 +0200)
src/socket_server.cpp
src/socket_server.hxx

index 1d18fd2..d6ca439 100644 (file)
@@ -324,4 +324,11 @@ void socket_server_connection::close()
     }
 }
 
+bool socket_server_connection::fill_buffer(long long usec_timeout,long long* usec_timeout_remaining)
+{
+    bool new_data = socket_handler::fill_buffer(buffer,usec_timeout,usec_timeout_remaining);
+    if (new_data)
+        reset_timeout();
+    return new_data;
+}
 }
index 74d8e07..bbba379 100644 (file)
@@ -95,8 +95,7 @@ class socket_server_connection : public socket_handler, public server_connection
             { socket_write(data); }
 
     public:
-        bool fill_buffer(long long usec_timeout=-1,long long* usec_timeout_remaining=NULL)
-            { return socket_handler::fill_buffer(buffer,usec_timeout,usec_timeout_remaining); }
+        bool fill_buffer(long long usec_timeout=-1,long long* usec_timeout_remaining=NULL);
 
         virtual void close();
 };