when mongodb isn't available sharejs does not throw any messages. Instead just failing silently in weird ways.
It is easy enough to add an error message at line 37
but that only will catch errors when you are trying to login with a username/password.
Why is .open() only being called when a username and password are required line 35? Could I add an error message at line 37 and get rid of the test at line 35?
If that's ok, I'll make a pull request. save someone else a bunch of nasty debugging.
This sounds good to me. I was going to work on this today in fact. Reconnecting seems unreliable too - I'll have a think about that if you don't get round to it. :)
@bfirsh we're experiencing reconnect flakiness too, now that we're no longering restarting our dev server every couple hours. have you had luck improving the connection code?
Nope - I haven't had any time I'm afraid. I may have time in a few weeks to take a look at this.