mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-22 13:34:04 +03:00
Merge remote-tracking branch 'origin/v3.6'
This commit is contained in:
commit
f099870c60
@ -26,6 +26,10 @@ class UdsApplication(QtWidgets.QApplication): # type: ignore
|
|||||||
self.lastWindowClosed.connect(self.closeTunnels) # type: ignore
|
self.lastWindowClosed.connect(self.closeTunnels) # type: ignore
|
||||||
|
|
||||||
def cleanTunnels(self) -> None:
|
def cleanTunnels(self) -> None:
|
||||||
|
'''
|
||||||
|
Removes all finished tunnels from the list
|
||||||
|
'''
|
||||||
|
|
||||||
def isRunning(p: subprocess.Popen):
|
def isRunning(p: subprocess.Popen):
|
||||||
try:
|
try:
|
||||||
if p.poll() is None:
|
if p.poll() is None:
|
||||||
@ -34,13 +38,13 @@ class UdsApplication(QtWidgets.QApplication): # type: ignore
|
|||||||
logger.debug('Got error polling subprocess: %s', e)
|
logger.debug('Got error polling subprocess: %s', e)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
for k in [i for i, tunnel in enumerate(self.tunnels) if not isRunning(tunnel)]:
|
# Remove references to finished tunnels, they will be garbage collected
|
||||||
try:
|
self.tunnels = [tunnel for tunnel in self.tunnels if isRunning(tunnel)]
|
||||||
del self.tunnels[k]
|
|
||||||
except Exception as e:
|
|
||||||
logger.debug('Error closing tunnel: %s', e)
|
|
||||||
|
|
||||||
def closeTunnels(self) -> None:
|
def closeTunnels(self) -> None:
|
||||||
|
'''
|
||||||
|
Finishes all running tunnels
|
||||||
|
'''
|
||||||
logger.debug('Closing remaining tunnels')
|
logger.debug('Closing remaining tunnels')
|
||||||
for tunnel in self.tunnels:
|
for tunnel in self.tunnels:
|
||||||
logger.debug('Checking %s - "%s"', tunnel, tunnel.poll())
|
logger.debug('Checking %s - "%s"', tunnel, tunnel.poll())
|
||||||
@ -74,6 +78,6 @@ def main(args: typing.List[str]):
|
|||||||
|
|
||||||
sys.exit(app.exec())
|
sys.exit(app.exec())
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main(args=sys.argv)
|
main(args=sys.argv)
|
||||||
|
|
||||||
|
@ -192,6 +192,12 @@ class RDPFile:
|
|||||||
if self.customParameters and self.customParameters.strip() != '':
|
if self.customParameters and self.customParameters.strip() != '':
|
||||||
params += shlex.split(self.customParameters.strip())
|
params += shlex.split(self.customParameters.strip())
|
||||||
|
|
||||||
|
# On MacOSX, /rfx /gfx:rfx are almost inprescindible, as it seems the only way to get a decent performance
|
||||||
|
if self.target == OsDetector.KnownOS.Macintosh:
|
||||||
|
for i in ('/rfx', '/gfx:rfx'):
|
||||||
|
if i not in params:
|
||||||
|
params.append(i)
|
||||||
|
|
||||||
return params
|
return params
|
||||||
|
|
||||||
def getGeneric(self): # pylint: disable=too-many-statements
|
def getGeneric(self): # pylint: disable=too-many-statements
|
||||||
|
Loading…
Reference in New Issue
Block a user