mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-06-30 20:10:57 +12:00
Fix threading for beacon
This commit is contained in:
parent
c2e3caa63d
commit
be6ed54afd
|
@ -116,8 +116,9 @@ public class AppBeaconServer {
|
|||
BeaconInterface.getAll().forEach(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);
|
||||
t.setDaemon(true);
|
||||
t.setName("http handler");
|
||||
t.setUncaughtExceptionHandler((t1, e) -> {
|
||||
ErrorEvent.fromThrowable(e).handle();
|
||||
|
|
Loading…
Reference in a new issue