sleep before reconnecting
authorChristian Weiske <cweiske@cweiske.de>
Thu, 2 Jul 2015 17:56:23 +0000 (19:56 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 2 Jul 2015 17:56:23 +0000 (19:56 +0200)
src/callnotifier/Source/Remote.php

index 16c27c0..be7604f 100644 (file)
@@ -21,6 +21,9 @@ class Source_Remote
                 $this->loop();
             } catch (Exception_ConnectionReset $e) {
                 $tryAgain = true;
+                //connection is refused directly after a connection reset
+                //hopefully waiting a bit will help
+                sleep(10);
             }
         } while ($tryAgain);
         $this->disconnect();