Software /
code /
prosody
Comparison
net/server_event.lua @ 7385:17929cdacec2
Merge 0.9->0.10
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 19 Apr 2016 17:30:30 +0200 |
parent | 7339:b5565715fce8 |
parent | 7384:65abd9d7bf88 |
child | 7386:5a9af30d5737 |
child | 7394:a700d54c620a |
comparison
equal
deleted
inserted
replaced
7381:a05bf94646ba | 7385:17929cdacec2 |
---|---|
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 |