diff 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
line wrap: on
line diff
--- a/net/server_event.lua	Tue May 26 12:30:17 2026 +0100
+++ b/net/server_event.lua	Tue May 26 16:00:47 2026 +0100
@@ -947,7 +947,7 @@
 				self.wantwrite = base:addevent(fd, EV_WRITE, function ()
 					onwriteable(self);
 				end);
-			elseif not r and self.wantread then
+			elseif not w and self.wantwrite then
 				self.wantwrite:close();
 				self.wantwrite = nil;
 			end