summaryrefslogtreecommitdiff
path: root/src/conf_mode/vpn_sstp.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-21 17:55:08 +0200
committerChristian Poessinger <christian@poessinger.com>2020-04-21 17:55:08 +0200
commit8998b56a92debb423f8bec19e4953059c585b704 (patch)
tree7def78f674d96ad584162ab1347ea6b7fa4b1cd6 /src/conf_mode/vpn_sstp.py
parent3f3efab7812f79e9fe9acffac0222d313344c25c (diff)
downloadvyos-1x-8998b56a92debb423f8bec19e4953059c585b704.tar.gz
vyos-1x-8998b56a92debb423f8bec19e4953059c585b704.zip
vyos.util: migrate all cpu_count() occurances to common get_half_cpus()
Diffstat (limited to 'src/conf_mode/vpn_sstp.py')
-rwxr-xr-xsrc/conf_mode/vpn_sstp.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/conf_mode/vpn_sstp.py b/src/conf_mode/vpn_sstp.py
index 9ec352290..90b4f1f34 100755
--- a/src/conf_mode/vpn_sstp.py
+++ b/src/conf_mode/vpn_sstp.py
@@ -23,7 +23,7 @@ from stat import S_IRUSR, S_IWUSR, S_IRGRP
from vyos.config import Config
from vyos import ConfigError
-from vyos.util import call, run
+from vyos.util import call, run, get_half_cpus
from vyos.template import render
@@ -56,7 +56,7 @@ default_config_data = {
'ppp_echo_failure' : '',
'ppp_echo_interval' : '',
'ppp_echo_timeout' : '',
- 'thread_cnt' : 1
+ 'thread_cnt' : get_half_cpus()
}
def get_config():
@@ -68,10 +68,6 @@ def get_config():
conf.set_level(base_path)
- cpu = os.cpu_count()
- if cpu > 1:
- sstp['thread_cnt'] = int(cpu/2)
-
if conf.exists(['authentication', 'mode']):
sstp['auth_mode'] = conf.return_value(['authentication', 'mode'])