Moved rtime out of the if/else block

rtime in both the if and else block is unnecessary. Moving it out the if/else block has the same result.
pull/516/head
Tim 2018-02-27 01:57:40 +01:00 committed by GitHub
parent b4d8daf327
commit a2d782d59c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -157,12 +157,11 @@ class StatusUpdater {
socket_send($socket, $package, strLen($package), 0); socket_send($socket, $package, strLen($package), 0);
if (socket_read($socket, 255)) { if (socket_read($socket, 255)) {
$this->rtime = microtime(true) - $starttime;
$status = true; $status = true;
} else { } else {
$this->rtime = microtime(true) - $starttime;
$status = false; $status = false;
} }
$this->rtime = microtime(true) - $starttime;
socket_close($socket); socket_close($socket);
// check if server is available and rerun if asked. // check if server is available and rerun if asked.