Changeset

7811:24f99d11b792

net.server_epoll: Fix traceback if wrapclient called without a pattern or parent server
author Kim Alvefur <zash@zash.se>
date Thu, 05 Jan 2017 06:21:31 +0100
parents 7810:cdb5dd9f35c0
children 7817:4e3654031693
files net/server_epoll.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/server_epoll.lua	Wed Jan 04 13:18:06 2017 +0100
+++ b/net/server_epoll.lua	Thu Jan 05 06:21:31 2017 +0100
@@ -472,7 +472,7 @@
 		server = server;
 		created = gettime();
 		listeners = listeners;
-		_pattern = pattern or server._pattern;
+		_pattern = pattern or (server and server._pattern);
 		writebuffer = {};
 		tls = tls;
 	}, interface_mt);