-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Console logs "Booting Client" around 100 times, then crashes. #953
Comments
There is no such string as "Booting Client" in the socket.io source code |
Then it might be nodejs itself... I'll repost the Issue there |
I found out that it acctually does contain "booting client" under node_modules/socket.io/lib/socket.js |
The code where it does that is line 290 to 310:
} return this; |
Oh good catch, it seemed that my files where out of date :p |
Good, I hope we can fix this now. It really is slowing down my development. |
I have an idea what it might be: Which basically(at least to my understanding) disconnect the client. So when the function is called, it disconnects the client, what calls it again. Also this only happens since my newest update in ym game, and I remember including the 'socket.on("disconnect"' |
Seems like it was my fault (Stupid idiot me). I had put socket.disconnect() in the socket.on("disconnect") event thinking that it would call it only once, stupid stupid me. Changed it to socket.once("disconnect") now. Sorry for wasting your time. |
I am kind of not satisfied with this answer. Mine is a similar issue, Help if you can find some answer...
|
I have a bug(?) with my node.js. And I think it has something to do with socket.io. So what it does is Logging "Booting Client" around a hundred times, then it crashes with the error:
util.js:35 var str = String(f).replace(formatRegExp, function(x) { ^ RangeError: Maximum call stack size exceeded
I am guessing that the stack size is exceeded because Socket.io is doing "booting client" so many times.
The text was updated successfully, but these errors were encountered: