From: "Lin Jen-Shin (godfat)" <godfat-hOE/xeEBYYIdnm+yROfE0A@public.gmane.org>
To: "Rainbows! list" <rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org>
Subject: [PATCH] close_connection_after_writing only if not deferred, as in cool.io
Date: Wed, 19 Dec 2012 04:36:17 +0800 [thread overview]
Message-ID: <CAA2_N1scEcW3J=4dmUVvd+UgLwuayqkpfjNfVGLCJw-dXm9_cA@mail.gmail.com> (raw)
In-Reply-To: <CAA2_N1s+SefHd7Dotw53+5b=-EeBt_O5Q-LmoKuUy65jZiZ+tA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
I don't have 100% confidence about this,
but running test suite "t/t0002-graceful.sh"
during my development for EventMachineThreadPool
would need this to properly pass the tests.
I think this would be needed while using
`throw :async' as well?
The patch is also available on Github:
https://github.com/godfat/rainbows/pull/1
>From bd5c38005f44bbe003bd416f7f871f15b0010c85 Mon Sep 17 00:00:00 2001
From: Lin Jen-Shin <godfat-hOE/xeEBYYIdnm+yROfE0A@public.gmane.org>
Date: Wed, 19 Dec 2012 04:03:55 +0800
Subject: [PATCH] close_connection_after_writing only if not deferred, as in
cool.io
---
lib/rainbows/event_machine/client.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/rainbows/event_machine/client.rb
b/lib/rainbows/event_machine/client.rb
index fc0dfe3..ebb6f17 100644
--- a/lib/rainbows/event_machine/client.rb
+++ b/lib/rainbows/event_machine/client.rb
@@ -28,7 +28,7 @@ class Rainbows::EventMachine::Client < EM::Connection
def quit
super
- close_connection_after_writing
+ close_connection_after_writing if nil == @deferred
end
def app_call input
--
1.8.0.2
_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying
next parent reply other threads:[~2012-12-18 20:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAA2_N1tHbvs=J--dPZLnq6_owEx3JJZbFoRzjFKcCLBONW=iGA@mail.gmail.com>
[not found] ` <CAA2_N1s+SefHd7Dotw53+5b=-EeBt_O5Q-LmoKuUy65jZiZ+tA@mail.gmail.com>
[not found] ` <CAA2_N1s+SefHd7Dotw53+5b=-EeBt_O5Q-LmoKuUy65jZiZ+tA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-12-18 20:36 ` Lin Jen-Shin (godfat) [this message]
[not found] ` <CAA2_N1scEcW3J=4dmUVvd+UgLwuayqkpfjNfVGLCJw-dXm9_cA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-12-18 21:45 ` [PATCH] close_connection_after_writing only if not deferred, as in cool.io Eric Wong
[not found] ` <20121218214538.GA12275-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2012-12-18 22:20 ` Lin Jen-Shin (godfat)
[not found] ` <CAA2_N1ur-dxw4i9dvMhTNAcskJe+N=4hU2Yuq341TxvJ2KE4kw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-12-18 23:59 ` Eric Wong
[not found] ` <20121218235954.GA14404-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2012-12-28 4:45 ` Lin Jen-Shin (godfat)
[not found] ` <CAA2_N1ujCb8Yt4FGJNaTN0FdSk6g_iqL5N747Vcxt5etp9RnMw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-12-28 8:43 ` Eric Wong
[not found] ` <20121228084337.GB19512-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2012-12-28 11:26 ` Lin Jen-Shin (godfat)
[not found] ` <CAA2_N1tCYbJjh_NvdVOQzJ5hvdv5NYnBM+VhP105uRvCzbnF_A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-12-29 13:26 ` Eric Wong
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/rainbows/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAA2_N1scEcW3J=4dmUVvd+UgLwuayqkpfjNfVGLCJw-dXm9_cA@mail.gmail.com' \
--to=godfat-hoe/xeebyyidnm+yrofe0a@public.gmane.org \
--cc=rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/rainbows.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).