Flotype / now

NowJS makes it easy to build real-time web apps using JavaScript
http://www.nowjs.com
MIT License
1.91k stars 175 forks source link

Fix for #92 #93

Closed toqueteos closed 13 years ago

toqueteos commented 13 years ago

More details: https://github.com/Flotype/now/issues/92

P.D: My editor trimmed some spaces.

dvv commented 13 years ago

Hmmm. We gotta reveal the cause of the error, not just silence it, imho...

toqueteos commented 13 years ago

Well, that's a bit far from my now's js internal knowledge but I'll say it's related to funcion serialization order.

I guess nowjs first establishes the connection (socket.io), then serializes all the client functions and only then you can play around with all of them. Am I right? Setting a var before that maybe messes things up.

Gotta check how does this magic thing work.

tommedema commented 13 years ago

@toqueteos, what do you mean with "breaks" the server? If it causes harm to the server this is not a client-side problem.

toqueteos commented 13 years ago

@tommedema It's both.

Take the multiroom example. Run it. Connect with Chrome. Then with Firefox, Chrome still in. Server crashes.

I use nowjs at college to chat with my friends without disturbing the class. Every now and then one of us uses FF, server crashes because of this.

Today I figured out the "solution".

tommedema commented 13 years ago

@toqueteos, you did not provide a solution for the server side. This is way more important. In any way, the server should never crash because of any kind of client side code or request.

toqueteos commented 13 years ago

@tommedema Yep, I know. That's why I'm inspecting the server code right now and it's kind of hardcore for me. Until today I was only focusing on developing with now, not for it.

ericz commented 13 years ago

Hey guys, we're moving into a new office space right now so things are very hectic and development has been interrupted. I'll investigate further as soon as things settle down a bit.

@toqueteos, thanks for helping out

toqueteos commented 13 years ago

@ericz glad to hear that Eric, enjoy your new HQ :)

Meanwhile the "partial" fix can do the trick.