From ebd12e6b3e2139505176dc857689c27ea965a29e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?poljar=20=28Damir=20Jeli=C4=87=29?= Date: Fri, 2 Feb 2018 11:10:46 +0100 Subject: [PATCH] Clarify why we need to mark the socket as non blocking. --- main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.py b/main.py index f0918a1..834805b 100644 --- a/main.py +++ b/main.py @@ -127,6 +127,9 @@ def wrap_socket(server, file_descriptor): else: sock = temp_socket + # fromfd() duplicates the file descriptor but doesn't retain it's blocking + # non-blocking attribute, so mark the socket as non-blocking even though + # weechat already did that for us sock.setblocking(False) message = "{prefix}matrix: Doing SSL handshake...".format(