I'm guessing that happens (or doesn't happen) because of the at_exit
block inside its constructor.
I think it should either be reworked to use just one global at_exit
somewhere on the module level, or the docs should clarify somewhere that one should create one client instance globally. That is, to avoid creating instances dynamically per request (in a web app).
I also haven't managed to find any info as to whether the client is thread-safe, or we should use it through a connection pool.