Skip to content

Commit

Permalink
no need to retry EINTR errors after python 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkalti committed Mar 7, 2018
1 parent 3ff4753 commit 24a24b0
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions kuyruk/heartbeat.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import sys
import errno
import socket
import logging
import threading
Expand All @@ -25,11 +24,7 @@ def stop(self):
def _run(self):
while not self._stop.wait(1):
try:
try:
self._connection.send_heartbeat()
except socket.error as e:
if e.errno != errno.EINTR:
raise
self._connection.send_heartbeat()
except socket.timeout:
pass
except Exception as e:
Expand Down

0 comments on commit 24a24b0

Please sign in to comment.