datanoise / mongo.cr

Crystal binding for MongoDB C Driver
MIT License
97 stars 35 forks source link

add missing Mongo::Stream definitions and properly handle reconnection #55

Closed elbywan closed 4 years ago

elbywan commented 4 years ago

This PR is a follow-up of yesterday's PR #54.

I forgot to implement some defs that were missing in the mongo stream module, which caused issues when the database connection is lost (my bad!).

With those methods implemented the custom initiator should be much more robust and reconnect properly, just like the default initiator.