When runnung a Java NATS client like the one below with jnats 2.4.1, everything is fine. When updating to jnats 2.4.2, the shutdown takes approx. one minute after printing "finished":
import io.nats.client.Connection;
import io.nats.client.Nats;
import java.time.Duration;
public class Tryout {
public static void main(String[] args) throws Exception {
Connection con = Nats.connect();
con.drain(Duration.ofSeconds(10));
System.out.println("finished");
}
}
My environment: I'm running things from IntelliJ IDEA with an SBT build on a Windows 10 machine with Java 11.0.2.
Is this a bug in 2.4.2, or am I overlooking something?