mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-05-18 21:37:22 -04:00
Small fixes
This commit is contained in:
@@ -171,15 +171,15 @@ public abstract class BeaconConnection implements AutoCloseable {
|
||||
|
||||
private BeaconException unwrapException(Exception exception) {
|
||||
if (exception instanceof ServerException s) {
|
||||
return new BeaconException("An internal server error occurred", s.getCause());
|
||||
return new BeaconException("An internal server error occurred", s);
|
||||
}
|
||||
|
||||
if (exception instanceof ClientException s) {
|
||||
return new BeaconException("A client error occurred", s.getCause());
|
||||
return new BeaconException("A client error occurred", s);
|
||||
}
|
||||
|
||||
if (exception instanceof ConnectorException s) {
|
||||
return new BeaconException("A beacon connection error occurred", s.getCause());
|
||||
return new BeaconException("A beacon connection error occurred", s);
|
||||
}
|
||||
|
||||
return new BeaconException("An unexpected error occurred", exception);
|
||||
|
||||
@@ -63,7 +63,7 @@ public class BeaconServer {
|
||||
System.out.println("Starting daemon: " + command);
|
||||
}
|
||||
|
||||
new Thread(
|
||||
var out = new Thread(
|
||||
null,
|
||||
() -> {
|
||||
try {
|
||||
@@ -79,10 +79,11 @@ public class BeaconServer {
|
||||
ioe.printStackTrace();
|
||||
}
|
||||
},
|
||||
"daemon sysout")
|
||||
.start();
|
||||
"daemon sysout");
|
||||
out.setDaemon(true);
|
||||
out.start();
|
||||
|
||||
new Thread(
|
||||
var err = new Thread(
|
||||
null,
|
||||
() -> {
|
||||
try {
|
||||
@@ -98,8 +99,9 @@ public class BeaconServer {
|
||||
ioe.printStackTrace();
|
||||
}
|
||||
},
|
||||
"daemon syserr")
|
||||
.start();
|
||||
"daemon syserr");
|
||||
err.setDaemon(true);
|
||||
err.start();
|
||||
}
|
||||
|
||||
public static boolean tryStop(BeaconClient client) throws Exception {
|
||||
|
||||
@@ -11,7 +11,7 @@ import lombok.NonNull;
|
||||
import lombok.Value;
|
||||
import lombok.extern.jackson.Jacksonized;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
/**
|
||||
* Queries general information about a data source.
|
||||
@@ -50,7 +50,7 @@ public class QueryDataSourceExchange implements MessageExchange {
|
||||
String provider;
|
||||
|
||||
@NonNull
|
||||
Map<String, String> config;
|
||||
LinkedHashMap<String, String> config;
|
||||
|
||||
DataSource<?> internalSource;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user