net.server_select: Reset read timeout timer if the event is handled
authorKim Alvefur <zash@zash.se>
Fri, 3 Oct 2014 12:42:18 +0000 (14:42 +0200)
committerKim Alvefur <zash@zash.se>
Fri, 3 Oct 2014 12:42:18 +0000 (14:42 +0200)
net/server_select.lua

index 33c18a606140b316ecc55045104bac1750e683a7..486e953b6cb0269f3c1eb94b762fdc5be118e912 100644 (file)
@@ -886,6 +886,8 @@ loop = function(once) -- this is the main loop of the program
                                        if not(handler.onreadtimeout) or handler:onreadtimeout() ~= true then
                                                handler.disconnect( )( handler, "read timeout" )
                                                handler:close( )        -- forced disconnect?
+                                       else
+                                               _readtimes[ handler ] = _currenttime -- reset timer
                                        end
                                end
                        end