summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--routers/router.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/routers/router.php b/routers/router.php
index 6e564d6..26a9226 100644
--- a/routers/router.php
+++ b/routers/router.php
@@ -39,6 +39,17 @@ abstract class Router {
$this->config = $config;
$this->id = $id;
$this->requester = $requester;
+
+ // Set defaults if not present
+ if (!isset($this->config['timeout'])) {
+ $this->config['timeout'] = 30;
+ }
+ if (!isset($this->config['disable_ipv6'])) {
+ $this->config['disable_ipv6'] = false;
+ }
+ if (!isset($this->config['disable_ipv4'])) {
+ $this->config['disable_ipv4'] = false;
+ }
}
private function sanitize_output($output) {