From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_NONE,SPF_PASS shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 4E24820A1E for ; Sat, 8 Dec 2018 08:30:44 +0000 (UTC) Received: by mail-pg1-x544.google.com with SMTP id v28so2738824pgk.10 for ; Sat, 08 Dec 2018 00:30:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=godfat.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SMxEg+qWNXeKf5Cp19zuscurxDgu4WgjbsFTzLfGS2M=; b=WzHe1IrUdSnC88skheftZnFOIolREXr7evSFGmgBYjnzhD3M7eBXdR2zUypkVl4DxB FJM9u05ZO433fw7lz/bZwPnoapI5zCO4QcHQFidemwzAJgiI4PjKZA2eHTYMytgD69n3 D2dvts51iWYCPinbqEaiD23hYxAfLhBVfW9fA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SMxEg+qWNXeKf5Cp19zuscurxDgu4WgjbsFTzLfGS2M=; b=ozzn/ecwjHMZtVjz4Rs1VQV5Vn3bwrc2D4yLhopLpwG8/AReN4QpFQ/DnUVLq6Vpk3 5e7+G0QaeuDyiWekduATjie14Zs88ASzhnuHmnoiyNXsPO+Q9VeFpxN0LIW25tkeh7Ii dop7C/sMiN+x+OMC2g9QCi1QeRVsHKIyQpc70hceMcgga+HwDH6jyoHbHQ81qef6RJb1 OL0EAHZ0qGm7XsINgsnXcWIXN3Y+NLrebkZqmyJnDmV1V3/6H5+PhjKkow/0OsI2YFwN 644KyAmh1A5SDiIyRYOd1ok4VSWD2ihC62nX7028bpaBkdC4oGnuJRY2J5Wno9KJf9r2 5Yxg== X-Gm-Message-State: AA+aEWbUr9gzsT5VIxj2vnlGDyAAkdCfLX3cmcIa8dRRkt6ct7mDlH5D xl9rZr7Ul74rjTBmEvB+aC+bS88u4j6ZkQ== X-Google-Smtp-Source: AFSGD/Xpdy9QuGLqpP3d8UYr6IZpuyXqMFzz62KtpSph8x5/v3VoZOf0bjkarTLdEpgC6IabCOUtCQ== X-Received: by 2002:a62:b24a:: with SMTP id x71mr5329386pfe.148.1544257843391; Sat, 08 Dec 2018 00:30:43 -0800 (PST) Received: from li1544-77.localdomain ([2400:8902::f03c:91ff:fee0:d06a]) by smtp.gmail.com with ESMTPSA id r8sm6444393pgr.48.2018.12.08.00.30.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Dec 2018 00:30:42 -0800 (PST) From: Lin Jen-Shin To: yahns-public@yhbt.net Cc: Lin Jen-Shin Subject: [PATCH 2/2] @srv.shutdown could raise Errno::ENOTCONN Date: Sat, 8 Dec 2018 08:30:19 +0000 Message-Id: <20181208083019.4374-2-godfat@godfat.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181208083019.4374-1-godfat@godfat.org> References: <20181208083019.4374-1-godfat@godfat.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: After this fix, all tests except test_client_expire are passing on my system (macos 10.12.6). Honestly, I don't really care if it's working perfectly fine. It's just nice to be able to run the same server on development machine. Production is of course Linux. --- test/test_bin.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test_bin.rb b/test/test_bin.rb index 6d4faf6..fc85992 100644 --- a/test/test_bin.rb +++ b/test/test_bin.rb @@ -99,7 +99,10 @@ def bin_daemon(worker, inherit) # Even with a synchronous FD_CLOEXEC, there's a chance of a race # because the server does not bind right away. unless inherit - @srv.shutdown + begin + @srv.shutdown + rescue Errno::ENOTCONN + end @srv.close end exec(*@cmd) -- 2.19.2