Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default socket timeout for all socket oprations. #212

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tools/map_syncer/map_syncer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import queue
import shutil
import signal
import socket
import sys
import threading
import time
Expand Down Expand Up @@ -48,6 +49,10 @@
DEFAULT_DELETE_AFTER = 4 * 60 * 60 # 4 hours
DEFAULT_POLL_INTERVAL = 10 * 60 # 10 minutes

# In some rare instances, sockets can get stuck. Let's make sure that
# we timeout them after some time for all socket oprations.
socket.setdefaulttimeout(60)


@dataclass
class LiveMapEntry:
Expand Down
Loading