[icinga-checkins] icinga.org: icingaweb2/feature/livestatus-playground-4787: Livestatus\Connection: make use of socketError

git at icinga.org git at icinga.org
Sun Nov 16 17:17:19 CET 2014


Module: icingaweb2
Branch: feature/livestatus-playground-4787
Commit: a027efc9e742d2a5f15967a3effd11aac24f3bd8
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=a027efc9e742d2a5f15967a3effd11aac24f3bd8

Author: Thomas Gelf <thomas at gelf.net>
Date:   Sun Nov 16 15:55:20 2014 +0100

Livestatus\Connection: make use of socketError

---

 library/Icinga/Protocol/Livestatus/Connection.php |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/library/Icinga/Protocol/Livestatus/Connection.php b/library/Icinga/Protocol/Livestatus/Connection.php
index 58e6c87..3f6f8f3 100644
--- a/library/Icinga/Protocol/Livestatus/Connection.php
+++ b/library/Icinga/Protocol/Livestatus/Connection.php
@@ -250,9 +250,9 @@ class Connection
 
     protected function writeToSocket($data)
     {
-        $res = socket_write($this->connection, $data);
+        $res = @socket_write($this->getConnection(), $data);
         if ($res === false) {
-            throw new IcingaException('Writing to livestatus socket failed');
+            $this->socketError('Writing to livestatus socket failed');
         }
         return true;
     }



More information about the icinga-checkins mailing list