Livestatus\Connection: make use of socketError

This commit is contained in:
Thomas Gelf 2014-11-16 15:55:20 +01:00
parent d66c95a725
commit a027efc9e7

View File

@ -250,9 +250,9 @@ class Connection
protected function writeToSocket($data) protected function writeToSocket($data)
{ {
$res = socket_write($this->connection, $data); $res = @socket_write($this->getConnection(), $data);
if ($res === false) { if ($res === false) {
throw new IcingaException('Writing to livestatus socket failed'); $this->socketError('Writing to livestatus socket failed');
} }
return true; return true;
} }