comparison net/server_event.lua @ 14199:8eac8de97bca 13.0 13.0.6

net.server_event: Fix incorrect flag logic for watchfd handles
author Matthew Wild <mwild1@gmail.com>
date Tue, 26 May 2026 16:00:47 +0100
parents dae094b392d1
children 91afc1f07337
comparison
equal deleted inserted replaced
14196:303069346d10 14199:8eac8de97bca
945 if w ~= nil then 945 if w ~= nil then
946 if w and not self.wantwrite then 946 if w and not self.wantwrite then
947 self.wantwrite = base:addevent(fd, EV_WRITE, function () 947 self.wantwrite = base:addevent(fd, EV_WRITE, function ()
948 onwriteable(self); 948 onwriteable(self);
949 end); 949 end);
950 elseif not r and self.wantread then 950 elseif not w and self.wantwrite then
951 self.wantwrite:close(); 951 self.wantwrite:close();
952 self.wantwrite = nil; 952 self.wantwrite = nil;
953 end 953 end
954 end 954 end
955 end 955 end