From 486c81cc29fc91750b5b57d0edb55754c2d97e39 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 19 Jun 2023 02:09:34 +0200 Subject: [PATCH] Small fix --- src/DataCenterConnection.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DataCenterConnection.php b/src/DataCenterConnection.php index 902539662..86afe0abc 100644 --- a/src/DataCenterConnection.php +++ b/src/DataCenterConnection.php @@ -404,6 +404,7 @@ final class DataCenterConnection implements JsonSerializable */ public function flush(): void { + if (!isset($this->datacenter)) return; $this->API->logger->logger("Flushing pending messages, DC {$this->datacenter}", Logger::NOTICE); foreach ($this->connections as $socket) { $socket->flush();