From 103602259a2c5ff236c070036ef01eab6e525169 Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Wed, 26 Mar 2014 14:48:28 +0800 Subject: [PATCH] bugfix: socket.block will block socket.close --- lualib/socket.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lualib/socket.lua b/lualib/socket.lua index 24ec2fdf..b041ccb8 100644 --- a/lualib/socket.lua +++ b/lualib/socket.lua @@ -257,6 +257,9 @@ function socket.block(id) assert(not s.read_required) s.read_required = 0 suspend(s) + if not s.connected and s.closing then + skynet.wakeup(s.closing) + end return s.connected end