Skip to content

Commit 722969b

Browse files
committed
[#70] db-client*: add :keep-alive? option (@kirankulkarni)
1 parent 331eb46 commit 722969b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/taoensso/faraday.clj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@
9393
etc."
9494
(memoize
9595
(fn [{:keys [provider creds access-key secret-key endpoint proxy-host proxy-port
96-
proxy-username proxy-password
97-
conn-timeout max-conns max-error-retry socket-timeout]
96+
proxy-username proxy-password
97+
conn-timeout max-conns max-error-retry socket-timeout keep-alive?]
9898
:as client-opts}]
9999
(if (empty? client-opts) (AmazonDynamoDBClient.) ; Default client
100100
(let [creds (or creds (:credentials client-opts)) ; Deprecated opt
@@ -116,7 +116,8 @@
116116
conn-timeout (.setConnectionTimeout g)
117117
max-conns (.setMaxConnections g)
118118
max-error-retry (.setMaxErrorRetry g)
119-
socket-timeout (.setSocketTimeout g))]
119+
socket-timeout (.setSocketTimeout g)
120+
keep-alive? (.setUseTcpKeepAlive g))]
120121
(doto-cond [g (if provider
121122
(AmazonDynamoDBClient. provider client-config)
122123
(AmazonDynamoDBClient. aws-creds client-config))]

0 commit comments

Comments
 (0)