Skip to content

Commit

Permalink
Make DHT ignore SIGINT (learning-at-home#493)
Browse files Browse the repository at this point in the history
* make DHT ignore SIGINT
* update p2pd version

Co-authored-by: @borzunov
  • Loading branch information
dbaranchuk authored Jul 4, 2022
1 parent ee75b91 commit 61e5e8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions hivemind/dht/dht.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import asyncio
import multiprocessing as mp
import os
import signal
from functools import partial
from typing import Awaitable, Callable, Iterable, List, Optional, Sequence, TypeVar, Union

Expand Down Expand Up @@ -94,6 +95,9 @@ def run(self) -> None:
loop.add_reader(self._inner_pipe.fileno(), pipe_semaphore.release)

async def _run():
# Set SIG_IGN handler to SIGINT
signal.signal(signal.SIGINT, signal.SIG_IGN)

try:
if self._daemon_listen_maddr is not None:
replicated_p2p = await P2P.replicate(self._daemon_listen_maddr)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
from setuptools.command.build_py import build_py
from setuptools.command.develop import develop

P2PD_VERSION = "v0.3.9"
P2PD_VERSION = "v0.3.10"

P2PD_SOURCE_URL = f"https://github.com/learning-at-home/go-libp2p-daemon/archive/refs/tags/{P2PD_VERSION}.tar.gz"
P2PD_BINARY_URL = f"https://github.com/learning-at-home/go-libp2p-daemon/releases/download/{P2PD_VERSION}/"

# The value is sha256 of the binary from the release page
EXECUTABLES = {
"p2pd": "8f9434f4717f6e851430f75f07e283d5ddeb2c7cde1b3648e677d813703f4e40",
"p2pd": "a9728685fd020dd5f0292e64b82740ac1643bbe9f793ec6d0b765c7efc28bcec",
}


Expand Down

0 comments on commit 61e5e8c

Please sign in to comment.