Comparison

net/server_epoll.lua @ 11703:e57c5d9c722c

net.server_epoll: Fix traceback-causing typo Caused "attempt to index a string value (local 'data')", but only if keep_buffers is set to false, which is not the default. Introduced in 917eca7be82b
author Kim Alvefur <zash@zash.se>
date Sun, 18 Jul 2021 08:53:37 +0200
parent 11702:c206430e2643
child 11738:3f1450ec37f4
comparison
equal deleted inserted replaced
11702:c206430e2643 11703:e57c5d9c722c
502 buffer[1] = data:sub(partial+1); 502 buffer[1] = data:sub(partial+1);
503 for i = #buffer, 2, -1 do 503 for i = #buffer, 2, -1 do
504 buffer[i] = nil; 504 buffer[i] = nil;
505 end 505 end
506 else 506 else
507 data.writebuffer = data:sub(partial+1); 507 self.writebuffer = data:sub(partial+1);
508 end 508 end
509 self:set(nil, true); 509 self:set(nil, true);
510 self:setwritetimeout(); 510 self:setwritetimeout();
511 end 511 end
512 if err == "wantwrite" or err == "timeout" then 512 if err == "wantwrite" or err == "timeout" then