mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
use socket.shutdown where timeout
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -102,4 +102,8 @@ function sockethelper.close(fd)
|
||||
socket.close(fd)
|
||||
end
|
||||
|
||||
function sockethelper.shutdown(fd)
|
||||
socket.shutdown(fd)
|
||||
end
|
||||
|
||||
return sockethelper
|
||||
|
||||
Reference in New Issue
Block a user