Skip to content

Commit

Permalink
Fixed a couple of minor bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
cubiclesoft committed Feb 18, 2017
1 parent 6376b5f commit a53c739
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions web_server.php
Expand Up @@ -883,14 +883,13 @@ public function GetClient($id)

public function DetachClient($id)
{
if (isset($this->clients[$id]))
{
$client = $this->clients[$id];
if (!isset($this->clients[$id])) return false;

unset($this->clients[$id]);
$client = $this->clients[$id];

return $client;
}
unset($this->clients[$id]);

return $client;
}

public function RemoveClient($id)
Expand Down Expand Up @@ -935,11 +934,6 @@ public function Open()
return $this->fp;
}

public function Write($data)
{
fwrite($this->fp, $data);
}

public function Read($size)
{
if ($this->fp === false) return false;
Expand All @@ -951,6 +945,11 @@ public function Read($size)
return $data;
}

public function Write($data)
{
return fwrite($this->fp, $data);
}

public function Close()
{
if (is_resource($this->fp)) @fclose($this->fp);
Expand Down

0 comments on commit a53c739

Please sign in to comment.