Update conditional check for (host && port) || (connection)