Replies: 1 comment
-
Sorry I make a mistake . I add return line when I got false by socket.send. It won't generate make the assert error. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm a new skynet learner. When I use telnet connect my skynet server.
I type CTRL+] and type "quit" in telnet terminal to quit. It will lead a assert error message in server terminal.
Here's my key server code.
while true do
local readdata = socket.read(fd)
if readdata ~= false then
print(fd .. " recv" .. readdata)
for k,v in pairs(clients) do
socket.write(k , readdata)
end
else
clients[fd] = nil
for k,v in pairs(clients) do
socket.write(k , "Someone exit")
end
socket.close(fd)
end
end
Here's the skyner server terminal error message.
[:00000009] lua call [0 to :9 : 0 msgsz = 24] error : ./skynet/lualib/skynet.lua:860: ./skynet/lualib/skynet.lua:331: ./skynet/lualib/skynet/socket.lua:307: assertion failed!
stack traceback:
[C]: in function 'assert'
./skynet/lualib/skynet/socket.lua:307: in function 'skynet.socket.read'
./service/gateway/init.lua:12: in field 'callback'
./skynet/lualib/skynet/socket.lua:145: in field '?'
./skynet/lualib/skynet/socket.lua:206: in upvalue 'f'
./skynet/lualib/skynet.lua:281: in function <./skynet/lualib/skynet.lua:253>
stack traceback:
[C]: in function 'assert'
./skynet/lualib/skynet.lua:860: in function 'skynet.dispatch_message'
Should I ignore this message or use other way to deal will disconnected.
Beta Was this translation helpful? Give feedback.
All reactions