Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3CFBB10A7A for ; Wed, 7 Aug 2013 10:12:58 +0000 (UTC) Received: (qmail 64063 invoked by uid 500); 7 Aug 2013 10:12:54 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 64018 invoked by uid 500); 7 Aug 2013 10:12:54 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 64009 invoked by uid 99); 7 Aug 2013 10:12:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Aug 2013 10:12:53 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=HTML_MESSAGE,MSGID_MULTIPLE_AT,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of hidayath.basha@saventech.com designates 216.32.181.183 as permitted sender) Received: from [216.32.181.183] (HELO ch1outboundpool.messaging.microsoft.com) (216.32.181.183) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Aug 2013 10:12:46 +0000 Received: from mail177-ch1-R.bigfish.com (10.43.68.249) by CH1EHSOBE002.bigfish.com (10.43.70.52) with Microsoft SMTP Server id 14.1.225.22; Wed, 7 Aug 2013 10:12:25 +0000 Received: from mail177-ch1 (localhost [127.0.0.1]) by mail177-ch1-R.bigfish.com (Postfix) with ESMTP id 125A42E01F4 for ; Wed, 7 Aug 2013 10:12:25 +0000 (UTC) X-Forefront-Antispam-Report: CIP:157.56.237.101;KIP:(null);UIP:(null);IPV:NLI;H:BY2PRD0810HT005.namprd08.prod.outlook.com;RD:none;EFVD:NLI X-SpamScore: -1 X-BigFish: PS-1(zzc85fh146fIzz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6hzz1d7338h17326ah18c673h1c8fb4h1de096h8275bh8275dh1de097hz2fh2a8h5c0h668h839hd24he5bhf0ah1288h12a5h12bdh137ah139eh1441h1504h1537h162dh1631h1758h17f1h1898h18e1h1946h19b5h19ceh1ad9h1b0ah1bceh1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e1dh1e23h1155h) Received-SPF: pass (mail177-ch1: domain of saventech.com designates 157.56.237.101 as permitted sender) client-ip=157.56.237.101; envelope-from=hidayath.basha@saventech.com; helo=BY2PRD0810HT005.namprd08.prod.outlook.com ;.outlook.com ; Received: from mail177-ch1 (localhost.localdomain [127.0.0.1]) by mail177-ch1 (MessageSwitch) id 1375870342729289_29486; Wed, 7 Aug 2013 10:12:22 +0000 (UTC) Received: from CH1EHSMHS035.bigfish.com (snatpool2.int.messaging.microsoft.com [10.43.68.234]) by mail177-ch1.bigfish.com (Postfix) with ESMTP id AE306140219 for ; Wed, 7 Aug 2013 10:12:22 +0000 (UTC) Received: from BY2PRD0810HT005.namprd08.prod.outlook.com (157.56.237.101) by CH1EHSMHS035.bigfish.com (10.43.70.35) with Microsoft SMTP Server (TLS) id 14.16.227.3; Wed, 7 Aug 2013 10:12:21 +0000 Received: from hidayath77PC (122.183.102.226) by pod51019.outlook.com (10.255.94.40) with Microsoft SMTP Server (TLS) id 14.16.341.1; Wed, 7 Aug 2013 10:12:19 +0000 From: hidayath To: Subject: Connection not Closed at TCP level Date: Wed, 7 Aug 2013 15:42:15 +0530 Message-ID: <005201ce9356$99cc80f0$cd6582d0$@basha@saventech.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0053_01CE9384.B384BCF0" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac6TVpdPkngaD/uRTAuDwiERG2fhBQ== Content-Language: en-us X-Originating-IP: [122.183.102.226] X-OriginatorOrg: saventech.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_0053_01CE9384.B384BCF0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, We have a websocket application which keeps writing data to the clients. We found that when tabs (not whole browser) of Firefox (ver. 22) is closed, the websocket connection is not closed. Anyway, reproducibility is very low. And the sendQ (netstat -an) keeps growing So, what we did is. we kept sending heart beat from client. If this heart beat timeout occurs, we are trying to close the connection as follows ByteBuffer bbuff = ByteBuffer.allocate(1); bbuff.put((byte) 0); messageInbound.getWsOutbound().close(0, bbuff); Is this correct approach to close the connection from server? Because, the connection is not closed at lower level (netstat -an). Anyway, writing data to it , is stopped and sendQ stops growing. # netstat -an | grep :8080 tcp 0 402376 172.22.59.176:8080 198.162.18.207:64805 ESTABLISHED Thanks and regards, Hidayath ------=_NextPart_000_0053_01CE9384.B384BCF0--