This commit is contained in:
wangyu- 2017-11-11 01:58:21 -06:00
parent 211d7ea4d3
commit 5b1e59cae2

View File

@ -229,11 +229,6 @@ int client_on_timer(conn_info_t &conn_info) //for client. called when a timer is
return 0; return 0;
} }
if(get_current_time()-conn_info.last_hb_sent_time<heartbeat_interval)
{
return 0;
}
if(get_current_time()- conn_info.last_oppsite_roller_time>client_conn_uplink_timeout) if(get_current_time()- conn_info.last_oppsite_roller_time>client_conn_uplink_timeout)
{ {
conn_info.state.client_current_state=client_idle; conn_info.state.client_current_state=client_idle;
@ -241,6 +236,14 @@ int client_on_timer(conn_info_t &conn_info) //for client. called when a timer is
mylog(log_info,"state back to client_idle from client_ready bc of client-->server direction timeout\n"); mylog(log_info,"state back to client_idle from client_ready bc of client-->server direction timeout\n");
} }
if(get_current_time()-conn_info.last_hb_sent_time<heartbeat_interval)
{
return 0;
}
mylog(log_debug,"heartbeat sent <%x,%x>\n",conn_info.oppsite_id,conn_info.my_id); mylog(log_debug,"heartbeat sent <%x,%x>\n",conn_info.oppsite_id,conn_info.my_id);
if(hb_mode==0) if(hb_mode==0)