Comparison

net/server_event.lua @ 7393:1909bde0e79f

net.server_event: Return the correct value as timeout
author Kim Alvefur <zash@zash.se>
date Tue, 19 Apr 2016 18:20:39 +0200
parent 7392:c774622ad9db
child 7394:a700d54c620a
child 7398:206f9b0485ad
comparison
equal deleted inserted replaced
7392:c774622ad9db 7393:1909bde0e79f
547 interface.eventstarthandshake = addevent( base, nil, EV_TIMEOUT, interface.startsslcallback, 0 ) 547 interface.eventstarthandshake = addevent( base, nil, EV_TIMEOUT, interface.startsslcallback, 0 )
548 elseif interface.writebuffer ~= 0 then 548 elseif interface.writebuffer ~= 0 then
549 -- data possibly written from ondrain 549 -- data possibly written from ondrain
550 return EV_WRITE, cfg.WRITE_TIMEOUT 550 return EV_WRITE, cfg.WRITE_TIMEOUT
551 elseif interface.eventreadtimeout then 551 elseif interface.eventreadtimeout then
552 return EV_WRITE, EV_TIMEOUT 552 return EV_WRITE, cfg.WRITE_TIMEOUT
553 end 553 end
554 interface.eventwrite = nil 554 interface.eventwrite = nil
555 return -1 555 return -1
556 elseif byte and (err == "timeout" or err == "wantwrite") then -- want write again 556 elseif byte and (err == "timeout" or err == "wantwrite") then -- want write again
557 --vdebug( "writebuffer is not empty:", err ) 557 --vdebug( "writebuffer is not empty:", err )