interfAIce icon indicating copy to clipboard operation
interfAIce copied to clipboard

[WIP] fix: make `OpenAiProxyFactory` closable

Open mscheong01 opened this issue 2 years ago • 1 comments

resolves #25

mscheong01 avatar Jun 11 '23 10:06 mscheong01

@davin111 After doing some research, here is what I learned:

  • Spring WebClient, which is based on Reactor Netty uses daemon threads for handling network connections -> this is why tests exit normally
  • OkhttpClient uses non-daemon threads for network connection by default, making the tests wait for a while to exit

so instead of using this implementation, we could customize the OkhttpClient to use daemon threads for executors (After doing some research on whether there are other side effects) ref: https://github.com/square/okhttp/issues/4029, chatgpt

mscheong01 avatar Jun 13 '23 09:06 mscheong01