yahns Ruby server user/dev discussion
 help / color / Atom feed
From: Lin Jen-Shin <godfat@godfat.org>
To: yahns-public@yhbt.net
Cc: Lin Jen-Shin <godfat@godfat.org>
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> (raw)
In-Reply-To: <20181208083019.4374-1-godfat@godfat.org>

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

  reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-08  8:30 [PATCH 1/2] Add QueueQuitter#closed? to queue_quitter_pipe.rb Lin Jen-Shin
2018-12-08  8:30 ` Lin Jen-Shin [this message]
2018-12-08 11:36 ` Eric Wong
2018-12-08 11:52   ` Lin Jen-Shin (godfat)
2018-12-08 17:20     ` Eric Wong
2018-12-09  8:49       ` Lin Jen-Shin (godfat)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://yhbt.net/yahns/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181208083019.4374-2-godfat@godfat.org \
    --to=godfat@godfat.org \
    --cc=yahns-public@yhbt.net \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

yahns Ruby server user/dev discussion

Archives are clonable:
	git clone --mirror https://yhbt.net/yahns-public
	git clone --mirror http://ou63pmih66umazou.onion/yahns-public

Example config snippet for mirrors

Newsgroups are available over NNTP:

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git