Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
6fa31bb0
Commit
6fa31bb0
authored
Mar 02, 2022
by
Francesc Guasch
Browse files
refactor: work around port conflict on startup
parent
b225727c
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/Ravada.pm
View file @
6fa31bb0
...
...
@@ -3563,7 +3563,8 @@ sub _kill_dead_process($self) {
"
SELECT id,pid,command,start_time
"
.
"
FROM requests
"
.
"
WHERE start_time<?
"
.
"
AND ( status like 'working%' OR status like 'downloading%')
"
.
"
AND ( status like 'working%' OR status like 'downloading%'
"
.
"
OR status like 'start%' )
"
.
"
AND pid IS NOT NULL
"
);
$sth
->
execute
(
time
-
2
);
...
...
lib/Ravada/Domain.pm
View file @
6fa31bb0
...
...
@@ -1386,6 +1386,11 @@ sub _fix_duplicate_display_port($self, $port) {
if
(
$is_builtin
)
{
my
$domain_conflict
=
Ravada::
Domain
->
open
(
$id_domain
);
if
(
$domain_conflict
&&
$domain_conflict
->
is_active
)
{
Ravada::
Request
->
refresh_machine
(
id_domain
=>
$domain_conflict
->
id
,
uid
=>
Ravada::Utils::
user_daemon
->
id
,
_force
=>
1
);
my
$req
=
Ravada::
Request
->
shutdown_domain
(
id_domain
=>
$self
->
id
,
uid
=>
Ravada::Utils::
user_daemon
->
id
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment