Software /
code /
prosody
Comparison
net/server_select.lua @ 7745:6d6a04628954
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 26 Nov 2016 20:11:03 +0100 |
parent | 7530:f14094d10925 |
parent | 7738:0647b821e00a |
child | 8528:67311cda0625 |
comparison
equal
deleted
inserted
replaced
7737:f93b3083b46b | 7745:6d6a04628954 |
---|---|
414 handler.clientport = function( ) | 414 handler.clientport = function( ) |
415 return clientport | 415 return clientport |
416 end | 416 end |
417 handler.port = handler.clientport -- COMPAT server_event | 417 handler.port = handler.clientport -- COMPAT server_event |
418 local write = function( self, data ) | 418 local write = function( self, data ) |
419 if not handler then return false end | |
419 bufferlen = bufferlen + #data | 420 bufferlen = bufferlen + #data |
420 if bufferlen > maxsendlen then | 421 if bufferlen > maxsendlen then |
421 _closelist[ handler ] = "send buffer exceeded" -- cannot close the client at the moment, have to wait to the end of the cycle | 422 _closelist[ handler ] = "send buffer exceeded" -- cannot close the client at the moment, have to wait to the end of the cycle |
422 handler.write = idfalse -- dont write anymore | 423 handler.write = idfalse -- dont write anymore |
423 return false | 424 return false |