소스 검색

changing condition for ping such as to give the server a kick after packets are sent

logicp 5 년 전
부모
커밋
fadb672bc4
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      src/client.cpp

+ 1 - 2
src/client.cpp

@@ -332,8 +332,7 @@ void Client::sendPackets(uint8_t* data, int size) {
 }
 
 void Client::ping() {
-  if (m_client_socket_fd != -1 && outgoing_files.isEmpty() &&
-      sent_files.empty()) {
+  if (m_client_socket_fd != -1 && sent_files.empty()) {
     uint8_t send_buffer[5];
     memset(send_buffer, 0, 5);
     send_buffer[4] = (TaskCode::PINGBYTE & 0xFF);