mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 08:21:59 +02:00
Customize web app port
This commit is contained in:
@@ -15,31 +15,19 @@ class ClapperWebApp extends Gio.SubprocessLauncher
|
||||
super._init({ flags });
|
||||
|
||||
this.daemonApp = null;
|
||||
this.isDaemonClosing = false;
|
||||
}
|
||||
|
||||
startDaemonApp()
|
||||
startDaemonApp(port)
|
||||
{
|
||||
if(this.daemonApp)
|
||||
return;
|
||||
|
||||
this.daemonApp = this.spawnv([Misc.appId + '.Daemon']);
|
||||
this.daemonApp = this.spawnv([Misc.appId + '.Daemon', String(port)]);
|
||||
this.daemonApp.wait_async(null, this._onDaemonClosed.bind(this));
|
||||
|
||||
debug('daemon app started');
|
||||
}
|
||||
|
||||
stopDaemonApp()
|
||||
{
|
||||
if(!this.daemonApp || this.isDaemonClosing)
|
||||
return;
|
||||
|
||||
this.isDaemonClosing = true;
|
||||
this.daemonApp.force_exit();
|
||||
|
||||
debug('send stop signal to daemon app');
|
||||
}
|
||||
|
||||
_onDaemonClosed(proc, result)
|
||||
{
|
||||
let hadError;
|
||||
@@ -52,7 +40,6 @@ class ClapperWebApp extends Gio.SubprocessLauncher
|
||||
}
|
||||
|
||||
this.daemonApp = null;
|
||||
this.isDaemonClosing = false;
|
||||
|
||||
if(hadError)
|
||||
debug('daemon app exited with error or was forced to close');
|
||||
|
Reference in New Issue
Block a user