Application won't close after Api.get
Hi
When running sbt run the main method does not exit after api.get(...).onComplete() but instead hangs. It seems some thread is still active and not cleaned up. I don't see this behaviour in the Java kit.
The Java kit is a completely different code base, so it's not really surprising.
Could you give me some code snippet where you can consistently reproduce the problem?
Here is an example https://gist.github.com/zipon/224455e586acbc205419
I see, it's probably in the HttpClient:
https://github.com/prismicio/scala-kit/blob/master/src/main/scala/io/prismic/HttpClient.scala
Looks like you're not closing the channels?
When googling I came across the following:
channel.write( ... ).addListener(ChannelFutureListener.CLOSE)
I think ctx.close() is supposed to do it but maybe I'm wrong