steve0511 / resty-redis-cluster

Openresty lua client for redis cluster.
Apache License 2.0
376 stars 134 forks source link

Fix for max_connection_timeout in worker/timer context #88

Closed mrgonza78 closed 3 years ago

mrgonza78 commented 3 years ago

ngx.req.start_time is not available when using this client in the worker/timer context.

In this case ngx.req.start_time() always returns 0 and max_connection_timeout always triggers a timeout without even attempting a connection

iramello commented 3 years ago

@henriquechehad

mrgonza78 commented 3 years ago

If I'm not mistaken ngx.req.start_time() is not available either in the "stream" module (https://github.com/openresty/stream-lua-nginx-module). Making max_connection_timeout useless when using this client in the "stream" block (vs the "http" block)

mrgonza78 commented 3 years ago

Thanks @steve0511 for merging it. Any chance we can generate a new version of this rock 1.05 including this change? Thanks

NivLipetz commented 3 years ago

Thanks for the fix 👑