aboutsummaryrefslogtreecommitdiff
path: root/lib/MasterWebInterface/Handler/Json
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MasterWebInterface/Handler/Json')
-rwxr-xr-xlib/MasterWebInterface/Handler/Json/JsonServerInfo.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/MasterWebInterface/Handler/Json/JsonServerInfo.pm b/lib/MasterWebInterface/Handler/Json/JsonServerInfo.pm
index 2ff6194..a3b2d08 100755
--- a/lib/MasterWebInterface/Handler/Json/JsonServerInfo.pm
+++ b/lib/MasterWebInterface/Handler/Json/JsonServerInfo.pm
@@ -21,7 +21,7 @@ sub json_serverinfo
ip => $ip,
hostport => $port,
limit => 1,
- )->[0] if ($ip && $port);
+ )->[0];
# allow all outside sources to access the json api
$self->resHeader("Access-Control-Allow-Origin", "*");
@@ -33,8 +33,8 @@ sub json_serverinfo
$self->resJSON({
error => 1,
in => "not_in_db",
- ip => $ip,
- port => $port,
+ ip => $ip // "0.0.0.0",
+ port => $port // 0,
});
return;
}