Hide Forgot
(In reply to comment #0) > when client_ping_cbk() is called not because of timer getting expired but > because of socket fd error (in case of tcpip) or ib error, we need to clean up > the associated timer, else timer will be called after 42 secs which will > disconnect a valid active connectoin. > > client_ping_cbk(): > if (op_ret == -1) { > /* timer expired and transport bailed out */ > gf_log (this->name, GF_LOG_DEBUG, "timer must have expired"); > goto out; > } > > if op_ret is -1 the do: > > if (conn->ping_timer != NULL) { > gf_timer_call_cancel (trans->xl->ctx, conn->ping_timer); // and also conn->ping_timer = NULL; > }
when client_ping_cbk() is called not because of timer getting expired but because of socket fd error (in case of tcpip) or ib error, we need to clean up the associated timer, else timer will be called after 42 secs which will disconnect a valid active connectoin. client_ping_cbk(): if (op_ret == -1) { /* timer expired and transport bailed out */ gf_log (this->name, GF_LOG_DEBUG, "timer must have expired"); goto out; } if op_ret is -1 the do: if (conn->ping_timer != NULL) { gf_timer_call_cancel (trans->xl->ctx, conn->ping_timer); }
PATCH: http://patches.gluster.com/patch/3911 in master (Cancel ping timer if socket or ib error)