Skip to content

Commit acf44b4

Browse files
committed
fix unit failed unit test
1 parent 35417eb commit acf44b4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Stream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Stream extends EventEmitter implements DuplexStreamInterface
1818
public function __construct($stream, LoopInterface $loop)
1919
{
2020
$this->stream = $stream;
21-
if (get_resource_type($this->stream) === "stream") {
21+
if (is_resource($this->stream) && get_resource_type($this->stream) === "stream") {
2222
stream_set_blocking($this->stream, 0);
2323
}
2424

0 commit comments

Comments
 (0)