mirror of
https://github.com/pi-hole/web.git
synced 2026-04-27 12:15:00 +01:00
Guard socket and FTL response
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
committed by
Adam Warner
parent
338c90d06a
commit
45340aaa23
@@ -79,7 +79,9 @@ function getResponseFTL($socket) {
|
||||
}
|
||||
|
||||
function disconnectFTL($socket) {
|
||||
if (is_resource($socket)) {
|
||||
fclose($socket);
|
||||
}
|
||||
}
|
||||
|
||||
function callFTLAPI($request, $FTL_IP = DEFAULT_FTL_IP, $port = DEFAULT_FTL_PORT) {
|
||||
@@ -92,7 +94,6 @@ function callFTLAPI($request, $FTL_IP = DEFAULT_FTL_IP, $port = DEFAULT_FTL_PORT
|
||||
$data = getResponseFTL($socket);
|
||||
}
|
||||
disconnectFTL($socket);
|
||||
|
||||
return $data;
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user