multi_socket_client: fix timeout check

pull/37/head V1.0.40
YuQing 2019-09-24 10:20:49 +08:00
parent cd4a1c3959
commit d366aa6492
2 changed files with 3 additions and 3 deletions

View File

@ -295,7 +295,7 @@ static int fast_multi_sock_client_deal_io(FastMultiSockClient *client)
while (client->pulling_count > 0) { while (client->pulling_count > 0) {
remain_timeout = client->deadline_time - get_current_time(); remain_timeout = client->deadline_time - get_current_time();
if (remain_timeout <= 0) { //timeout if (remain_timeout < 0) { //timeout
break; break;
} }

View File

@ -40,10 +40,10 @@ typedef struct fast_multi_sock_entry {
ConnectionInfo *conn; //the socket must be non-block socket ConnectionInfo *conn; //the socket must be non-block socket
FastBuffer *send_buffer; //send buffer for internal use FastBuffer *send_buffer; //send buffer for internal use
fast_multi_sock_client_io_func io_callback; //for internal use fast_multi_sock_client_io_func io_callback; //for internal use
FastBuffer recv_buffer; //recv buffer FastBuffer recv_buffer; //recv buffer for response package
int error_no; //0 for success, != 0 fail int error_no; //0 for success, != 0 fail
int remain; //remain bytes, for internal use int remain; //remain bytes, for internal use
FastMultiSockRecvStage recv_stage; FastMultiSockRecvStage recv_stage; //for internal use
bool done; //for internal use bool done; //for internal use
} FastMultiSockEntry; } FastMultiSockEntry;