Fix connection closing race in python rev test
@@ -262,13 +262,10 @@ def recv_all(sock, total_len, flags):
buf = sock.recv(total_len - len(barr), flags)
except InterruptedError:
continue
- # FIXME(scrye): Revocation confirmation messages are causing a race
- # condition during revocations. Delete the handler below after the
- # cause has been identified and fixed.
except ConnectionResetError:
- logging.error("ConnectionResetError: sock = %s, total_len = %s read_len = %s, "
- "data = %s" % (sock, total_len, len(barr), hex_str(barr)))
- raise
+ # Peer closed the connection without reading
+ logging.error("socket closed by peer")
+ return None
if not buf:
if not barr:
logging.debug("recv returned nil, socket closed")
