From 4ec0f47224c55725182e2fefa1749fba77e6fc0a Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 21 Jan 2010 12:56:08 +0000 Subject: net.server_{select,event}: Fail gracefully if socket doesn't have a setoption method (LuaSec issue I think) --- net/server_event.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'net/server_event.lua') diff --git a/net/server_event.lua b/net/server_event.lua index a1403911..c01c85a6 100644 --- a/net/server_event.lua +++ b/net/server_event.lua @@ -420,7 +420,10 @@ do end function interface_mt:setoption(option, value) - return self.conn:setoption(option, value); + if self.conn.setoption then + return self.conn:setoption(option, value); + end + return false, "setoption not implemented"; end -- Stub handlers -- cgit v1.2.3