minor fix
This commit is contained in:
1 parent
249f0b844b
commit
cc539814d8
2 files changed
+4
-3
No files matched your search
+2
-1
@@ -27,7 +27,7 @@ def receive_exact(sock, num_bytes):
|
||||
while len(received_data) < num_bytes:
|
||||
chunk = sock.recv(num_bytes - len(received_data))
|
||||
if not chunk:
|
||||
break
|
||||
raise ConnectionError("connection closed before the full message arrived")
|
||||
received_data += chunk
|
||||
return received_data
|
||||
|
||||
@@ -62,6 +62,7 @@ def grep_all_ips(ips, cmd):
|
||||
|
||||
except Exception as e:
|
||||
print(f"Failed to connect to {ip}:{PORT} - {e}")
|
||||
match_count.append(0)
|
||||
finally:
|
||||
client_socket.close()
|
||||
|
||||
|
||||
Reference in new issue
Block a user