You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My understanding is that when EM::Mongo::Connection is instantiated with the timeout parameter that an error should be raised if a connection cannot be established in that time. It looks like that's not happening.
Looking at the initializer for Connection confirms that the errback should raise the "failure with mongodb server..." error. The errback is never called, though. The reason is that the timeout timer is cancelled when the connection's unbind method calls set_deferred_status(nil). So the timeout timer never fires.
You can confirm the problem by stopping your mongod process and running the following code. I think it should raise an error, but it does not.
My understanding is that when
EM::Mongo::Connection
is instantiated with thetimeout
parameter that an error should be raised if a connection cannot be established in that time. It looks like that's not happening.Looking at the initializer for Connection confirms that the errback should raise the "failure with mongodb server..." error. The errback is never called, though. The reason is that the timeout timer is cancelled when the connection's unbind method calls
set_deferred_status(nil)
. So the timeout timer never fires.You can confirm the problem by stopping your mongod process and running the following code. I think it should raise an error, but it does not.
It's not obvious to me how, exactly, to fix this. Any suggestions?
The text was updated successfully, but these errors were encountered: