summaryrefslogtreecommitdiffstats
path: root/lib/class/scrobbler.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/class/scrobbler.class.php')
-rw-r--r--lib/class/scrobbler.class.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/class/scrobbler.class.php b/lib/class/scrobbler.class.php
index 78c5f36e..dd9775c3 100644
--- a/lib/class/scrobbler.class.php
+++ b/lib/class/scrobbler.class.php
@@ -181,10 +181,16 @@ class scrobbler {
$i++;
}
- $as_socket = @fsockopen($this->submit_host, $this->submit_port, $errno, $errstr, 5);
+ if (!trim($this->submit_host) || !$this->submit_port) {
+ $this->reset_handshake = true;
+ return false;
+ }
+
+ $as_socket = @fsockopen($this->submit_host, intval($this->submit_port), $errno, $errstr, 5);
if(!$as_socket) {
$this->error_msg = $errstr;
+ $this->reset_handshake = true;
return false;
}