summaryrefslogtreecommitdiff
path: root/auth/telnet.php
diff options
context:
space:
mode:
Diffstat (limited to 'auth/telnet.php')
-rw-r--r--auth/telnet.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/auth/telnet.php b/auth/telnet.php
index 20b85a6..4aa7a64 100644
--- a/auth/telnet.php
+++ b/auth/telnet.php
@@ -37,9 +37,11 @@ final class Telnet extends Authentication {
}
public function connect() {
- $this->connection = fsockopen($this->config['host'], $this->port);
+ $this->connection = fsockopen($this->config['host'], $this->port, $errno,
+ $errstr, $this->config['timeout']);
if (!$this->connection) {
- throw new Exception('Cannot connect to router.');
+ throw new Exception('Cannot connect to router (code '.$errno.'['.
+ $errstr.']).');
}
fputs($this->connection, $this->config['user']."\r\n");