From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Status: No, score=-1.2 required=3.0 tests=AWL,BAYES_00,URIBL_BLOCKED shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: yahns-public@yhbt.net Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42]) (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 466921FE1C for ; Wed, 23 Sep 2015 07:26:01 +0000 (UTC) Received: by lahg1 with SMTP id g1so40017900lah.1 for ; Wed, 23 Sep 2015 00:25:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=ykVCvLTFR5slK79OkvRm1YHM6ZUzT0BSc6wcNBT6mDk=; b=GmLgS+71Hphjc7Wsms/ixRypEx3O9KtP4RfglzQh5R8/TkyptizhqXSJRUGdGNBIRg qzu+LRoxtzL73gdVsNcTvTJzsfU5jdrEaWiR0jXZDNbceA3nolCWO3j4LqLwsrXrfKwk lLSEYf8ZA3B4cvf0bnFTkMbAITGPUsok2d3fSnSR1gDL4ULXVs05gUgUB/GKwjjbVtjz 9tcr9eQLIeNaM2VMKBVnKZcEeJWuBn4U+jmn05e0iI+yTgh1mzHl2ZGFEjeTYuxl6eL0 X51ZyTqmebSwm+9ste/XzHqgXuM09a5I3ocsR8iU+2rCAvrpvLcUCu3xsvbjSCrRUhS5 c2Zw== X-Gm-Message-State: ALoCoQnqBjxtUsrw/mAT3F1W/2vPuYuJ7nvsRMhEHj5nz9cNUTdaarZ+boXGofFmjmlikrW466YA X-Received: by 10.25.155.132 with SMTP id d126mr3521053lfe.33.1442993159397; Wed, 23 Sep 2015 00:25:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.73.38 with HTTP; Wed, 23 Sep 2015 00:25:29 -0700 (PDT) From: "Lin Jen-Shin (godfat)" Date: Wed, 23 Sep 2015 15:25:29 +0800 Message-ID: Subject: -1 shutdown_timeout? To: yahns-public@yhbt.net Content-Type: text/plain; charset=UTF-8 List-Id: Hi, I am trying to switch one application from using rainbows to yahns, and the application would do some long-polling. When I ctrl+c to interrupt yahns, I would see yahns is trying to drop clients which still connect, with timeout set to 5 (from my config setting client_timeout to 5). However, after a few seconds, there would be messages like this from yahns: dropping 0 of 1 clients for timeout=-1 The timeout would be -1 after a few seconds, and then it would only stop when those clients timeout at 60 seconds (this is my assumption though, it would show a request was around 60 seconds from CommonLogger (assumption again) in the end, and yahns would quit gracefully) I looked around the code, which should be: def dropping(fdmap) if drop_acceptors[0] || fdmap.size > 0 timeout = @shutdown_expire < Yahns.now ? -1 : @shutdown_timeout fdmap.desperate_expire(timeout) true else false end end While Yahns.now would get growing, I don't really understand why it's written like this? Is this intentional? If so, how could I force yahns shut those clients down in this case? Thanks!