Skip to content

Commit 244cd17

Browse files
committed
tcp
1 parent 396fa22 commit 244cd17

File tree

1 file changed

+3
-4
lines changed
  • vendor/fkubis/teamspeak-php-framework/TeamSpeak3/Transport

1 file changed

+3
-4
lines changed

vendor/fkubis/teamspeak-php-framework/TeamSpeak3/Transport/TCP.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function connect()
6565
}
6666

6767
@stream_set_timeout($this->stream, $timeout);
68-
@stream_set_blocking($this->stream, $this->config["blocking"] ? 1 : 0);
68+
@stream_set_blocking($this->stream, $this->config["blocking"] ? true : false);
6969
}
7070

7171
/**
@@ -98,6 +98,7 @@ public function read($length = 4096)
9898

9999
$data = @stream_get_contents($this->stream, $length);
100100

101+
101102
Signal::getInstance()->emit(strtolower($this->getAdapterType()) . "DataRead", $data);
102103

103104
if ($data === false) {
@@ -133,9 +134,7 @@ public function readLine($token = "\n")
133134
if ($line->count()) {
134135
$line->append($token);
135136
} else {
136-
throw new Ts3Exception(
137-
"connection to server '" . $this->config["host"] . ":" . $this->config["port"] . "' lost"
138-
);
137+
throw new Ts3Exception("connection to server '" . $this->config["host"] . ":" . $this->config["port"] . "' lost");
139138
}
140139
} else {
141140
$line->append($data);

0 commit comments

Comments
 (0)