how to determine whether an IEventStoreConnection is actually connected

Hi,

I’m interfacing with EventStore and before I perform any writes, I’d like ot find out whether the IEventStoreConnecton I’ve received from the calling code is actually connected. There doesn’t seem to be a property or reture from ConnectAsync
that will tell me that. Is ther an easy way of doing this?

Kind regards

Sean.

Like any async call.

Await connection.connectasync

The next question will probably be about timing out since this blocks. http://stackoverflow.com/questions/4238345/asynchronously-wait-for-taskt-to-complete-with-timeout though can also specify the timeouts on the connection (you may not want to)

Cheers,

Greg