Remove references to remote address from connection type logic

This commit is contained in:
mcarlton00 2019-08-31 20:20:10 -04:00
parent 6a31d01e50
commit f745e8ee75
1 changed files with 1 additions and 5 deletions

View File

@ -25,7 +25,6 @@ CONNECTION_STATE = {
} }
CONNECTION_MODE = { CONNECTION_MODE = {
'Local': 0, 'Local': 0,
'Remote': 1,
'Manual': 2 'Manual': 2
} }
@ -35,10 +34,9 @@ def get_server_address(server, mode):
modes = { modes = {
CONNECTION_MODE['Local']: server.get('LocalAddress'), CONNECTION_MODE['Local']: server.get('LocalAddress'),
CONNECTION_MODE['Remote']: server.get('RemoteAddress'),
CONNECTION_MODE['Manual']: server.get('ManualAddress') CONNECTION_MODE['Manual']: server.get('ManualAddress')
} }
return modes.get(mode) or server.get('ManualAddress', server.get('LocalAddress', server.get('RemoteAddress'))) return modes.get(mode) or server.get('ManualAddress', server.get('LocalAddress'))
class ConnectionManager(object): class ConnectionManager(object):
@ -215,8 +213,6 @@ class ConnectionManager(object):
tests.append(CONNECTION_MODE['Manual']) tests.append(CONNECTION_MODE['Manual'])
if CONNECTION_MODE['Local'] not in tests: if CONNECTION_MODE['Local'] not in tests:
tests.append(CONNECTION_MODE['Local']) tests.append(CONNECTION_MODE['Local'])
if CONNECTION_MODE['Remote'] not in tests:
tests.append(CONNECTION_MODE['Remote'])
# TODO: begin to wake server # TODO: begin to wake server