Fix grizzly server null check
This commit is contained in:
parent
dee9941a1f
commit
6e3c41f7c4
|
@ -91,6 +91,7 @@ public class DefaultWebhook implements Webhook, Closeable {
|
|||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
if (grizzlyServer != null) {
|
||||
try {
|
||||
grizzlyServer.shutdown(1, TimeUnit.MINUTES).get();
|
||||
} catch (ExecutionException ex) {
|
||||
|
@ -101,3 +102,4 @@ public class DefaultWebhook implements Webhook, Closeable {
|
|||
grizzlyServer.shutdownNow();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue