From d2cea9b70f983a38c75e245ceb2bef15a6f5ebfe Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Thu, 14 Aug 2014 13:49:49 +0800 Subject: [PATCH] socketchannel request only try connect once --- lualib/socketchannel.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lualib/socketchannel.lua b/lualib/socketchannel.lua index 45aeea54..89f1f1ec 100644 --- a/lualib/socketchannel.lua +++ b/lualib/socketchannel.lua @@ -296,7 +296,7 @@ local function wait_for_response(self, response) end function channel:request(request, response) - assert(block_connect(self)) + assert(block_connect(self, true)) -- connect once if not socket.write(self.__sock[1], request) then close_channel_socket(self)