From commits-return-47681-archive-asf-public=cust-asf.ponee.io@qpid.apache.org Thu Dec 20 05:16:49 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 50F2E180675 for ; Thu, 20 Dec 2018 05:16:49 +0100 (CET) Received: (qmail 73686 invoked by uid 500); 20 Dec 2018 04:16:48 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 73667 invoked by uid 99); 20 Dec 2018 04:16:47 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Dec 2018 04:16:47 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 22FCC80589; Thu, 20 Dec 2018 04:16:47 +0000 (UTC) Date: Thu, 20 Dec 2018 04:16:48 +0000 To: "commits@qpid.apache.org" Subject: [qpid-proton] 01/02: PROTON-1985: [Python] Actually make default to listen forever - Bug in current behaviour such that default ends up throwing every message away MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: astitcher@apache.org In-Reply-To: <154527940704.5947.8806366646168421143@gitbox.apache.org> References: <154527940704.5947.8806366646168421143@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: qpid-proton X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: 5d769bc802ea72bc8f700449472705e904572cf3 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20181220041647.22FCC80589@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. astitcher pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/qpid-proton.git commit 5d769bc802ea72bc8f700449472705e904572cf3 Author: Andrew Stitcher AuthorDate: Wed Dec 19 22:54:33 2018 -0500 PROTON-1985: [Python] Actually make default to listen forever - Bug in current behaviour such that default ends up throwing every message away --- python/examples/db_recv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/examples/db_recv.py b/python/examples/db_recv.py index 8c79049..ce27470 100755 --- a/python/examples/db_recv.py +++ b/python/examples/db_recv.py @@ -55,7 +55,7 @@ class Recv(MessagingHandler): def on_message(self, event): id = int(event.message.id) if (not self.last_id) or id > self.last_id: - if self.received < self.expected: + if self.expected == 0 or self.received < self.expected: self.received += 1 self.last_id = id self.db.insert(id, event.message.body, ApplicationEvent("record_inserted", delivery=event.delivery)) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org