Skip to content
Snippets Groups Projects
Commit 2865dae0 authored by rswindell's avatar rswindell
Browse files

Resolve the possibile error in the new binkstats.ini stuff for inbounds:

TypeError: bp.remote_addrs is undefined
parent 19113cb4
No related branches found
No related tags found
No related merge requests found
......@@ -1051,10 +1051,12 @@ function run_inbound(sock)
success = bp.accept(sock, inbound_auth_cb);
// Statistics
var addr = bp.remote_addrs[0];
if(addr) {
update_stats(stats.inbound[success], addr, bp, sock.remote_ip_address);
update_totals(stats.totals, addr, bp, false, success);
if(bp.remote_addrs !== undefined && bp.remote_addrs.length) {
var addr = bp.remote_addrs[0];
if(addr) {
update_stats(stats.inbound[success], addr, bp, sock.remote_ip_address);
update_totals(stats.totals, addr, bp, false, success);
}
}
callout_done(bp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment