summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_openvpn.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-08-18 14:34:09 +0000
committerErmal <eri@pfsense.org>2010-08-18 14:35:46 +0000
commit19e3d450b3c3dad6404ff3131fd9483e1ccc7277 (patch)
tree35f6c099ac67e22a9637e1c7cb35054091f8302e /usr/local/www/status_openvpn.php
parent3f797235b9f66670f6e7fbf6791883be658f7482 (diff)
downloadpfsense-19e3d450b3c3dad6404ff3131fd9483e1ccc7277.zip
pfsense-19e3d450b3c3dad6404ff3131fd9483e1ccc7277.tar.gz
Ticket #826. Add timeout of 1 second for all read/write actions performed on the socket. This should fix point 1) on the ticket.
Diffstat (limited to 'usr/local/www/status_openvpn.php')
-rw-r--r--usr/local/www/status_openvpn.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr/local/www/status_openvpn.php b/usr/local/www/status_openvpn.php
index 729ed70..8ee1eec 100644
--- a/usr/local/www/status_openvpn.php
+++ b/usr/local/www/status_openvpn.php
@@ -72,6 +72,7 @@ function kill_client($port, $remipp) {
$fp = @stream_socket_client($tcpsrv, $errval, $errstr, 1);
$killed = -1;
if ($fp) {
+ stream_set_timeout($fp, 1);
fputs($fp, "kill {$remipp}\n");
while (!feof($fp)) {
$line = fgets($fp, 1024);
OpenPOWER on IntegriCloud