qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject qpid-proton git commit: NO-JIRA: go: send example report unexpected message outcomes.
Date Tue, 07 Feb 2017 20:50:14 GMT
Repository: qpid-proton
Updated Branches:
  refs/heads/master 66d8f0e9c -> 6ff92f061


NO-JIRA: go: send example report unexpected message outcomes.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/6ff92f06
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/6ff92f06
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/6ff92f06

Branch: refs/heads/master
Commit: 6ff92f06117aae2c80f2e29b603128496a8f6bcc
Parents: 66d8f0e
Author: Alan Conway <aconway@redhat.com>
Authored: Fri Jan 27 17:19:21 2017 -0500
Committer: Alan Conway <aconway@redhat.com>
Committed: Tue Feb 7 15:44:39 2017 -0500

----------------------------------------------------------------------
 examples/go/electron/send.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/6ff92f06/examples/go/electron/send.go
----------------------------------------------------------------------
diff --git a/examples/go/electron/send.go b/examples/go/electron/send.go
index 2338b23..91cff28 100644
--- a/examples/go/electron/send.go
+++ b/examples/go/electron/send.go
@@ -92,7 +92,9 @@ func main() {
 	for i := 0; i < expect; i++ {
 		out := <-sentChan // Outcome of async sends.
 		if out.Error != nil {
-			log.Fatalf("acknowledgement[%v] %v error: %v\n", i, out.Value, out.Error)
+			log.Fatalf("acknowledgement[%v] %v error: %v", i, out.Value, out.Error)
+		} else if out.Status != electron.Accepted {
+			log.Fatalf("acknowledgement[%v] unexpected status: %v", i, out.Status)
 		} else {
 			Debugf("acknowledgement[%v]  %v (%v)\n", i, out.Value, out.Status)
 		}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message