void TransportLayerLegacy::_destroy(LegacySession& session) {
    if (!session.conn()->closed) {
        _closeConnection(session.conn());
    }

    _currentConnections.subtractAndFetch(1);
}
void TransportLayerLegacy::_destroy(LegacySession& session) {
    if (!session.conn()->closed) {
        _closeConnection(session.conn());
    }

    stdx::lock_guard<stdx::mutex> lk(_sessionsMutex);
    _sessions.erase(session.getIter());
}