mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
triger handle close when force close
This commit is contained in:
@@ -254,6 +254,7 @@ local function resolve_accept(self)
|
|||||||
local recv_buf = {}
|
local recv_buf = {}
|
||||||
while true do
|
while true do
|
||||||
if _isws_closed(self.id) then
|
if _isws_closed(self.id) then
|
||||||
|
try_handle(self, "close")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local fin, op, payload_data = read_frame(self)
|
local fin, op, payload_data = read_frame(self)
|
||||||
@@ -398,7 +399,9 @@ function M.accept(socket_id, handle, protocol)
|
|||||||
end
|
end
|
||||||
if not ok then
|
if not ok then
|
||||||
if err == socket_error then
|
if err == socket_error then
|
||||||
if not closed then
|
if closed then
|
||||||
|
try_handle(ws_obj, "close")
|
||||||
|
else
|
||||||
try_handle(ws_obj, "error")
|
try_handle(ws_obj, "error")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user