mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-10-01 09:40:35 +13:00
Fix threading for beacon
This commit is contained in:
parent
c2e3caa63d
commit
be6ed54afd
1 changed files with 2 additions and 1 deletions
|
@ -116,8 +116,9 @@ public class AppBeaconServer {
|
||||||
BeaconInterface.getAll().forEach(beaconInterface -> {
|
BeaconInterface.getAll().forEach(beaconInterface -> {
|
||||||
server.createContext(beaconInterface.getPath(), new BeaconRequestHandler<>(beaconInterface));
|
server.createContext(beaconInterface.getPath(), new BeaconRequestHandler<>(beaconInterface));
|
||||||
});
|
});
|
||||||
server.setExecutor(Executors.newSingleThreadExecutor(r -> {
|
server.setExecutor(Executors.newFixedThreadPool(5, r -> {
|
||||||
Thread t = Executors.defaultThreadFactory().newThread(r);
|
Thread t = Executors.defaultThreadFactory().newThread(r);
|
||||||
|
t.setDaemon(true);
|
||||||
t.setName("http handler");
|
t.setName("http handler");
|
||||||
t.setUncaughtExceptionHandler((t1, e) -> {
|
t.setUncaughtExceptionHandler((t1, e) -> {
|
||||||
ErrorEvent.fromThrowable(e).handle();
|
ErrorEvent.fromThrowable(e).handle();
|
||||||
|
|
Loading…
Reference in a new issue