nikepan / clickhouse-bulk

Collects many small inserts to ClickHouse and send in big inserts
Apache License 2.0
474 stars 86 forks source link

ConnectTimeout option is not tend to work properly #28

Closed Mixser closed 4 years ago

Mixser commented 4 years ago

Hi,

At NewClickhouse method your have been implemented not right behavior for the ConnectTimeout options:

c.ConnectTimeout = connectTimeout
if c.ConnectTimeout > 0 {
    c.ConnectTimeout = 10
}

So, if I will set any positive value for ConnectTimeout - it will be not used but rewritten to 10 seconds;

nikepan commented 4 years ago

Oh, thanks!

nikepan commented 4 years ago

I fixed it in release v1.2.6