mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +00:00
fix halfclose bug, See detail #1358
This commit is contained in:
@@ -269,8 +269,8 @@ function socket.close(id)
|
||||
if s == nil then
|
||||
return
|
||||
end
|
||||
driver.close(id)
|
||||
if s.connected then
|
||||
driver.close(id)
|
||||
if s.co then
|
||||
-- reading this socket on another coroutine, so don't shutdown (clear the buffer) immediately
|
||||
-- wait reading coroutine read the buffer.
|
||||
|
||||
Reference in New Issue
Block a user