Implemented fix for #102

This commit is contained in:
Simon Beginn 2020-10-11 16:03:53 +02:00
parent de1c115967
commit 09ee1dfb5c
1 changed files with 3 additions and 2 deletions

View File

@ -13,6 +13,7 @@ import pickle
import socketserver import socketserver
import queue as Queue import queue as Queue
import selectors import selectors
import getpass
from time import monotonic as time from time import monotonic as time
import pykms_RpcBind, pykms_RpcRequest import pykms_RpcBind, pykms_RpcRequest
@ -515,11 +516,11 @@ def server_check():
srv_config['listen'] = addresses srv_config['listen'] = addresses
def server_create(): def server_create():
# Create address list. # Create address list (when the current user indicates execution inside the Windows Sandbox, then we wont allow port reuse - it is not supported).
all_address = [( all_address = [(
srv_config['ip'], srv_config['port'], srv_config['ip'], srv_config['port'],
(srv_config['backlog_main'] if 'backlog_main' in srv_config else srv_options['backlog']['def']), (srv_config['backlog_main'] if 'backlog_main' in srv_config else srv_options['backlog']['def']),
(srv_config['reuse_main'] if 'reuse_main' in srv_config else srv_options['reuse']['def']) (srv_config['reuse_main'] if 'reuse_main' in srv_config else False if getpass.getuser() == 'WDAGUtilityAccount' else srv_options['reuse']['def'])
)] )]
log_address = "TCP server listening at %s on port %d" %(srv_config['ip'], srv_config['port']) log_address = "TCP server listening at %s on port %d" %(srv_config['ip'], srv_config['port'])