forked from qt-creator/qt-creator
Docker: Fix Shell destruction handling
Change-Id: I125ac2eaf99e8dff85da06640f048b502f36fa08 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -528,7 +528,14 @@ void DockerDevicePrivate::stopCurrentContainer()
|
|||||||
if (!DockerApi::isDockerDaemonAvailable(false).value_or(false))
|
if (!DockerApi::isDockerDaemonAvailable(false).value_or(false))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (m_shell) {
|
||||||
|
// We have to disconnect the shell from the device, otherwise it will try to
|
||||||
|
// tell us about the container being stopped. Since that signal is emitted in a different
|
||||||
|
// thread, it would be delayed received by us when we might already have started
|
||||||
|
// a new shell.
|
||||||
|
m_shell->disconnect(this);
|
||||||
m_shell.reset();
|
m_shell.reset();
|
||||||
|
}
|
||||||
|
|
||||||
QtcProcess proc;
|
QtcProcess proc;
|
||||||
proc.setCommand({m_settings->dockerBinaryPath.filePath(), {"container", "stop", m_container}});
|
proc.setCommand({m_settings->dockerBinaryPath.filePath(), {"container", "stop", m_container}});
|
||||||
|
|||||||
Reference in New Issue
Block a user