Skip to content

Commit

Permalink
Merge pull request #195 from ldilley/master
Browse files Browse the repository at this point in the history
Remove destructor
  • Loading branch information
ldilley authored Sep 14, 2023
2 parents 1e7b1a6 + 82ff1d8 commit 9758620
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion PHP/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fragland/minestat",
"version": "2.4.0",
"version": "2.4.1",
"type": "library",
"description": "A Minecraft server status checker",
"keywords": ["Minecraft","status"],
Expand Down
12 changes: 1 addition & 11 deletions PHP/minestat.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

class MineStat
{
const VERSION = "2.4.0"; // MineStat version
const VERSION = "2.4.1"; // MineStat version
const NUM_FIELDS = 6; // number of values expected from server
const NUM_FIELDS_BETA = 3; // number of values expected from a 1.8b/1.3 server
const MAX_VARINT_SIZE = 5; // maximum number of bytes a varint can be
Expand Down Expand Up @@ -124,16 +124,6 @@ public function __construct($address, $port = MineStat::DEFAULT_TCP_PORT, $timeo
$this->set_connection_status($retval);
}

public function __destruct()
{
if(@socket_read($this->socket, 1))
{
socket_shutdown($this->socket);
socket_close($this->socket);
$this->socket = null;
}
}

public function get_address() { return $this->address; }

public function get_port() { return $this->port; }
Expand Down

0 comments on commit 9758620

Please sign in to comment.