You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/02/07 20:52:22 UTC

[12/13] qpid-proton git commit: NO-JIRA: go: send example report unexpected message outcomes.

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/go1
Commit: 6ff92f06117aae2c80f2e29b603128496a8f6bcc
Parents: 66d8f0e
Author: Alan Conway <ac...@redhat.com>
Authored: Fri Jan 27 17:19:21 2017 -0500
Committer: Alan Conway <ac...@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