mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-09-23 00:45:35 +00:00
Context shutdown fixes
This commit is contained in:
@@ -167,6 +167,9 @@ public class StoreCreationComp extends DialogComp {
|
||||
v -> true,
|
||||
(newE, context, validated) -> {
|
||||
ThreadHelper.runAsync(() -> {
|
||||
if (context != null) {
|
||||
context.close();
|
||||
}
|
||||
if (!DataStorage.get().getStoreEntries().contains(e)) {
|
||||
DataStorage.get().addStoreEntryIfNotPresent(newE);
|
||||
} else {
|
||||
@@ -196,7 +199,7 @@ public class StoreCreationComp extends DialogComp {
|
||||
(e, context, validated) -> {
|
||||
try {
|
||||
DataStorage.get().addStoreEntryIfNotPresent(e);
|
||||
if (validated
|
||||
if (context != null && validated
|
||||
&& e.getProvider().shouldShowScan()
|
||||
&& AppPrefs.get()
|
||||
.openConnectionSearchWindowOnConnectionCreation()
|
||||
|
||||
@@ -34,6 +34,8 @@ public interface ProcessControl extends AutoCloseable {
|
||||
@Override
|
||||
void close() throws Exception;
|
||||
|
||||
void shutdown() throws Exception;
|
||||
|
||||
void kill();
|
||||
|
||||
ProcessControl start() throws Exception;
|
||||
|
||||
@@ -17,7 +17,7 @@ public class ShellValidationContext implements ValidationContext<ShellControl> {
|
||||
@Override
|
||||
public void close() {
|
||||
try {
|
||||
shellControl.close();
|
||||
shellControl.shutdown();
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +167,6 @@ init=Init
|
||||
shell=Shell
|
||||
hub=Hub
|
||||
#context: Computer script
|
||||
#force
|
||||
script=script
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user