Skip to content

Commit

Permalink
fix(hooks): Possible fix for hooks blocking main thread
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco (Valandur) committed Jul 22, 2019
1 parent f85a26c commit a28b5d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/main/java/valandur/webapi/WebAPI.java
Expand Up @@ -104,6 +104,9 @@ public static WebAPI getInstance() {

private static SpongeExecutorService syncExecutor;
private static SpongeExecutorService asyncExecutor;
public static SpongeExecutorService getAsyncExecutor() {
return WebAPI.asyncExecutor;
}

private boolean devMode = false;
public static boolean isDevMode() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/valandur/webapi/hook/WebHookService.java
Expand Up @@ -312,7 +312,7 @@ private void notifyHook(WebHook hook, WebHookType eventType, String source, Obje
connection.disconnect();
}
}
});
}, WebAPI.getAsyncExecutor());
}


Expand Down

0 comments on commit a28b5d8

Please sign in to comment.