Skip to content

Commit

Permalink
fix ws slave 避免没有设置好转发就开始处理消息
Browse files Browse the repository at this point in the history
  • Loading branch information
huahua132 committed Dec 19, 2024
1 parent ce2218a commit e4907d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion service/ws_slave.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ function HANDLER.connect(fd)
addr = addr,
}

skynet.send(g_watchdog,'lua', 'socket', 'open', fd, addr, SELF_ADDRESS, true)
--这里必须使用call,避免没有设置好转发就开始处理消息了
skynet.call(g_watchdog,'lua', 'socket', 'open', fd, addr, SELF_ADDRESS, true)
end

function HANDLER.handshake(fd,header,url)
Expand Down

0 comments on commit e4907d4

Please sign in to comment.