Skip to content

Commit

Permalink
#16: Fixed wrong check of output in finding-free-port logic
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelkiessling committed Jan 13, 2017
1 parent 9cb652f commit 9b94701
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JourneyMonitor/Monitor/JobRunner/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function run($retry = 0)
// Only "reserving" a port via the lock file is not enough because browsermob also grabs a lot of
// other ports while requests run over its proxy childs
if ( !file_exists('/var/tmp/journeymonitor-testcase-run-proxyport-' . $proxyPort . '.lock')
&& shell_exec('/usr/bin/lsof -P -i:' . $proxyPort . ' -n -sTCP:LISTEN 2>&1 | /usr/bin/wc -l') === '0\n') {
&& shell_exec('/usr/bin/lsof -P -i:' . $proxyPort . ' -n -sTCP:LISTEN 2>&1 | /usr/bin/wc -l') === "0\n") {
$found = true;
touch('/var/tmp/journeymonitor-testcase-run-proxyport-' . $proxyPort . '.lock');
}
Expand Down

0 comments on commit 9b94701

Please sign in to comment.