--- BareosBSock.php	2021-03-02 10:16:20.195329949 +0100
+++ /usr/share/bareos-webui/vendor/Bareos/library/Bareos/BSock/BareosBSock.php	2021-03-02 10:16:46.147329949 +0100
@@ -217,7 +217,7 @@
       $str_length += 4;
       while($this->socket && $str_length > 0) {
          $send = fwrite($this->socket, $msg, $str_length);
-         if($send === 0) {
+         if($send === false) {
             fclose($this->socket);
             $this->socket = null;
             return false;
