From 328770b36d0ec6474ed5338a42d74f2c5958e0a0 Mon Sep 17 00:00:00 2001 From: wangmingming <1960588251@qq.com> Date: Tue, 28 Dec 2021 11:17:30 +0800 Subject: [PATCH] fix:Stream(),The return value will not cancel --- example_client_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example_client_test.go b/example_client_test.go index bf3fe629..9f754562 100644 --- a/example_client_test.go +++ b/example_client_test.go @@ -191,7 +191,7 @@ func (session *Session) changeConnection(connection *amqp.Connection) { // and updates the channel listeners to reflect this. func (session *Session) changeChannel(channel *amqp.Channel) { session.channel = channel - session.notifyChanClose = make(chan *amqp.Error) + session.notifyChanClose = make(chan *amqp.Error, 1) session.notifyConfirm = make(chan amqp.Confirmation, 1) session.channel.NotifyClose(session.notifyChanClose) session.channel.NotifyPublish(session.notifyConfirm)