Diff

net/server_epoll.lua @ 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
parent 7800:dadf9ba290c5
child 7817:4e3654031693
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);