Software /
code /
prosody
Changeset
9915:9fe7b18bca15
net.server_event: Allow writing into buffer of write-locked connections
Check for 'nointerface' flag instead, whatever that means.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 24 Mar 2019 19:07:39 +0100 |
parents | 9914:2c6b7247c3d9 |
children | 9916:72501e3c1427 |
files | net/server_event.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server_event.lua Sun Mar 24 19:02:40 2019 +0100 +++ b/net/server_event.lua Sun Mar 24 19:07:39 2019 +0100 @@ -304,7 +304,7 @@ -- Public methods function interface_mt:write(data) - if self.nowriting then return nil, "locked" end + if self.nointerface then return nil, "locked"; end --vdebug( "try to send data to client, id/data:", self.id, data ) data = tostring( data ) local len = #data @@ -316,7 +316,7 @@ end t_insert(self.writebuffer, data) -- new buffer self.writebufferlen = total - if not self.eventwrite then -- register new write event + if not self.eventwrite and not self.nowriting then -- register new write event --vdebug( "register new write event" ) self.eventwrite = addevent( base, self.conn, EV_WRITE, self.writecallback, cfg.WRITE_TIMEOUT ) end