From 13f5b0f2df948993b1f98b9c145a1bdbc19db1ce Mon Sep 17 00:00:00 2001 From: Tobias Trozowski Date: Thu, 16 Jun 2022 12:35:25 +0200 Subject: [PATCH] fixed argument type mismatch --- src/InfluxDB/Driver/UDP.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/InfluxDB/Driver/UDP.php b/src/InfluxDB/Driver/UDP.php index 0cd3010..4ce14e0 100644 --- a/src/InfluxDB/Driver/UDP.php +++ b/src/InfluxDB/Driver/UDP.php @@ -75,6 +75,10 @@ public function write($data = null) $this->createStream(); } + if (!is_resource($this->stream)) { + return true; + } + @stream_socket_sendto($this->stream, $data); return true;