|
|
@ -106,7 +106,7 @@ event_route[xhttp:request] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (ws_handle_handshake()) { |
|
|
if (ws_handle_handshake()) { |
|
|
$shtinc(websockets=>$si::count); |
|
|
|
|
|
|
|
|
$var(shtinc) = $shtinc(websockets=>$si::count); |
|
|
xlog("L_INFO", "websocket|log|opened websocket $var(count) of 50 for $si:$sp\n"); |
|
|
xlog("L_INFO", "websocket|log|opened websocket $var(count) of 50 for $si:$sp\n"); |
|
|
exit; |
|
|
exit; |
|
|
} |
|
|
} |
|
|
@ -116,7 +116,7 @@ event_route[xhttp:request] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
event_route[websocket:closed] { |
|
|
event_route[websocket:closed] { |
|
|
$shtdec(websockets=>$si::count); |
|
|
|
|
|
|
|
|
$var(shtdec) = $shtdec(websockets=>$si::count); |
|
|
if ($sht(websockets=>$si::count) < 1) { |
|
|
if ($sht(websockets=>$si::count) < 1) { |
|
|
xlog("L_INFO", "websocket|log|$si:$sp closed last websocket to that IP\n"); |
|
|
xlog("L_INFO", "websocket|log|$si:$sp closed last websocket to that IP\n"); |
|
|
sht_rm_name_re(websockets=>$(si{re.subst,/\\./\\\\./g})::.*); |
|
|
sht_rm_name_re(websockets=>$(si{re.subst,/\\./\\\\./g})::.*); |
|
|
|