stijnsanders / TMongoWire

Delphi MongoDB driver
MIT License
102 stars 37 forks source link

Added ping command to TMongoWire #7

Closed smokingdev closed 12 years ago

smokingdev commented 12 years ago

Hi,

In my search for checking if the MongoDB connection is still alive I added the ping command which I found inside the Ruby driver documentation (http://api.mongodb.org/ruby/current/Mongo/Connection.html).

It is a command which returns even if the server is in lock. I chose to handle any exceptions TMongoWire throws inside the method, so it returns false in those cases.

Kind regards,

Fred Oranje