MongoConnection.alive

bool alive() @property @safe

Checks if the connection is alive by probing the socket for remote close.

Unlike connected, which only checks local socket state, this detects when the remote end has sent a FIN (server shutdown, timeout, etc.).