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
parent
b4d8daf327
commit
a2d782d59c
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue