Explorar o código

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

logicp %!s(int64=5) %!d(string=hai) anos
pai
achega
fadb672bc4
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  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);