From b8eea05f64ab9be519e4bfedce4810ba29b74c69 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sun, 1 Apr 2018 20:40:24 +0200 Subject: [PATCH] Small bugfix --- src/danog/MadelineProto/Connection.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/danog/MadelineProto/Connection.php b/src/danog/MadelineProto/Connection.php index 1e404411..d5d5897c 100644 --- a/src/danog/MadelineProto/Connection.php +++ b/src/danog/MadelineProto/Connection.php @@ -345,6 +345,8 @@ class Connection public function send_message($message) { + $this->must_open = $this->must_open || $this->sock === null || $this->sock->getResource() === null; + if ($this->must_open) { $this->__construct($this->proxy, $this->extra, $this->ip, $this->port, $this->protocol, $this->timeout, $this->ipv6); $this->must_open = false;