code: function isConnectionDead(cursor, callback) {
    if (cursor.pool && cursor.pool.isDestroyed()) {
      cursor.s.killed = true;
      const err = new MongoNetworkError(
        `connection to host ${cursor.pool.host}:${cursor.pool.port} was destroyed`
      );
      _setCursorNotifiedImpl(cursor, () => callback(err));
      return true;
    }
  
    return false;
  }
docs: Validate if the pool is dead and return error