Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Changes for Windows compatibility #32

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion magneticod/magneticod/bittorrent.py
Expand Up @@ -37,7 +37,8 @@ def __init__(self, info_hash: InfoHash, peer_addr: PeerAddress, max_metadata_siz
self.__socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_QUICKACK, True)

res = self.__socket.connect_ex(peer_addr)
if res != errno.EINPROGRESS:
# We either connected or connection is in progress:
if not res in (0, errno.EINPROGRESS, errno.EAGAIN, errno.WSAEWOULDBLOCK):
raise ConnectionError()

self.__peer_addr = peer_addr
Expand Down