Comparison

net/server_event.lua @ 7386:5a9af30d5737

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Tue, 19 Apr 2016 17:32:22 +0200
parent 7341:aa94cd27df4d
parent 7385:17929cdacec2
child 7395:97fe648176ab
comparison
equal deleted inserted replaced
7382:c8923f882274 7386:5a9af30d5737
519 debug "starting ssl handshake after writing" 519 debug "starting ssl handshake after writing"
520 interface.eventstarthandshake = addevent( base, nil, EV_TIMEOUT, interface.startsslcallback, 0 ) 520 interface.eventstarthandshake = addevent( base, nil, EV_TIMEOUT, interface.startsslcallback, 0 )
521 elseif interface.eventreadtimeout then 521 elseif interface.eventreadtimeout then
522 return EV_WRITE, EV_TIMEOUT 522 return EV_WRITE, EV_TIMEOUT
523 end 523 end
524 if interface.writebuffer ~= 0 then
525 -- data possibly written from ondrain
526 return EV_WRITE, cfg.WRITE_TIMEOUT
527 end
524 interface.eventwrite = nil 528 interface.eventwrite = nil
525 return -1 529 return -1
526 elseif byte and (err == "timeout" or err == "wantwrite") then -- want write again 530 elseif byte and (err == "timeout" or err == "wantwrite") then -- want write again
527 --vdebug( "writebuffer is not empty:", err ) 531 --vdebug( "writebuffer is not empty:", err )
528 interface.writebuffer[1] = s_sub( interface.writebuffer[1], byte + 1, interface.writebufferlen ) -- new buffer 532 interface.writebuffer[1] = s_sub( interface.writebuffer[1], byte + 1, interface.writebufferlen ) -- new buffer