use socket.shutdown where timeout

This commit is contained in:
Cloud Wu
2017-08-01 09:35:16 +08:00
parent f966199f28
commit 6d81c2b818
2 changed files with 5 additions and 1 deletions

View File

@@ -106,7 +106,7 @@ function httpc.request(method, host, url, recvheader, header, content)
if not finish then
local temp = fd
fd = nil
socket.close(temp)
socket.shutdown(temp)
end
end)
end

View File

@@ -102,4 +102,8 @@ function sockethelper.close(fd)
socket.close(fd)
end
function sockethelper.shutdown(fd)
socket.shutdown(fd)
end
return sockethelper