From 08915348019a37dec48914393de941b77e958f31 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 5 Jan 2017 06:21:31 +0100 Subject: net.server_epoll: Fix traceback if wrapclient called without a pattern or parent server --- net/server_epoll.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net') diff --git a/net/server_epoll.lua b/net/server_epoll.lua index 7a62b03c..0f340560 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -472,7 +472,7 @@ local function wrapsocket(client, server, pattern, listeners, tls) -- luasocket server = server; created = gettime(); listeners = listeners; - _pattern = pattern or server._pattern; + _pattern = pattern or (server and server._pattern); writebuffer = {}; tls = tls; }, interface_mt); -- cgit v1.2.3