mirror of
https://github.com/xpipe-io/xpipe.git
synced 2025-04-19 02:33:39 +00:00
Context shutdown fixes
This commit is contained in:
parent
eec1b807b2
commit
3fe38a4261
4 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue