MinnDevelopment/discord-webhooks

Process not terminating correctly

Qumoo opened this issue · 1 comments

Qumoo commented

Hello,

when using a WebhookClient and sending a message the process does not finish even when calling client.close().
My current code example is:

public class Main {

    public static void main(String[] args) {

	String url = "discord webhook link";

	System.out.println("Before");

        try (WebhookClient client = WebhookClient.withUrl(url)) {
            client.send("Hello World");
        }

        System.out.println("a");

    }
}

The output is

Before
After

but no termination of the program even though it is finished and the WebhookClient should be closed.
When calling a client method that is not send(...), for example isShutdown(), the process terminates as expected with:

Process finished with exit code 0

Other information:
Java 8
Discord-Webhook 0.7.2

Thanks in advance,
Qumo

Duplicate of #26