bwt icon indicating copy to clipboard operation
bwt copied to clipboard

Allow configuration of separate RPC socket connect timeout

Open craigraw opened this issue 2 years ago • 0 comments

The configuration parameter --bitcoind_timeout was added in 5f92c47, which configures the connect, read and write timeouts on socket connections to Core RPC.

However, one does not typically want the same values for the socket connect timeout as the read and write timeouts. Importing a wallet using importmulti can take many minutes or even hours, much longer than a user would want to wait for a timeout when testing a connection. Therefore, currently it is not possible to both set a short connect timeout and a long read timeout to handle both situations.

It would be helpful to have an additional --bitcoind_connect_timeout parameter which specifically sets only the value for RPC socket connections at https://github.com/bwt-dev/bwt/blob/6be05b82bc156a94201b21c24529b1529d5347f6/src/util/jsonrpc_proxy.rs#L64

Alternatively, the current --bitcoind_timeout parameter could be altered to only control the socket connect timeout, since it is likely that read and write timeouts should be indefinite anyway.

craigraw avatar Jun 06 '22 11:06 craigraw