Update socketchannel.lua

request的时候可能会连接失败,这时raise的不是socket_error,上层处理不太统一。
This commit is contained in:
rickone
2016-06-04 16:26:07 +08:00
parent 5332021086
commit 838e63ab62

View File

@@ -328,7 +328,8 @@ local function block_connect(self, once)
r = check_connection(self)
if r == nil then
error(string.format("Connect to %s:%d failed (%s)", self.__host, self.__port, err))
skynet.error(string.format("Connect to %s:%d failed (%s)", self.__host, self.__port, err))
error(socket_error)
else
return r
end