Async connection manager doesn't support Keystore.
gitankitsingh opened this issue · 1 comments
gitankitsingh commented
;; Having a reusable connection manage with a keystore like this
(def cm (conn-mgr/make-reusable-conn-manager {:timeout 100
:threads 10
:default-per-route 10
:keystore "keystore.jks"
:keystore-pass "pass"}))
;; and then making a request like this works.
(http/post url {:connection-manager cm})
but when using the async connection manager by using make-reusable-async-conn-manager to create a new async connection manager, it throws an exception while making the request with the created async connection manager.
(http/post url {:connection-manager cm
:async? true})
"class org.apache.http.conn.ssl.SSLConnectionSocketFactory cannot be cast to class org.apache.http.nio.conn.SchemeIOSessionStrategy (org.apache.http.conn.ssl.SSLConnectionSocketFactory and org.apache.http.nio.conn.SchemeIOSessionStrategy are in unnamed module of loader 'app')
rymndhng commented
Ah good find! I was able to reproduce this locally.
It appears the Async Connection Manager is mistakingly using the non-Async Registry builder which causes this issue.