Skip to content

Commit 6de88a0

Browse files
committed
Set aleph.http/request's default :connection-timeout to aleph.netty/default-connect-timeout, too
Not very useful in general but at least makes more sense in combination with the pool's default :connect-timeout of the same duration.
1 parent dbc1f71 commit 6de88a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/aleph/http.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@
345345
346346
Param key | Description
347347
-------------------- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------
348-
`connection-timeout` | timeout in milliseconds for the connection to become established, defaults to 60s. Note that this timeout will be ineffective if the pool's `connect-timeout` is lower.
348+
`connection-timeout` | timeout in milliseconds for the connection to become established, defaults to `aleph.netty/default-connect-timeout`. Note that this timeout will be ineffective if the pool's `connect-timeout` is lower.
349349
`follow-redirects?` | whether to follow redirects, defaults to `true`; see `aleph.http.client-middleware/handle-redirects`
350350
`middleware` | custom client middleware for the request
351351
`pool-timeout` | timeout in milliseconds for the pool to generate a connection
@@ -363,7 +363,7 @@
363363
:or {pool default-connection-pool
364364
response-executor default-response-executor
365365
middleware identity
366-
connection-timeout 6e4} ;; 60 seconds
366+
connection-timeout aleph.netty/default-connect-timeout}
367367
:as req}]
368368
(let [dispose-conn! (atom (fn []))
369369
result (d/deferred response-executor)

0 commit comments

Comments
 (0)