If the binding could not complete, an error will be returned and the channel
will be closed.
-When noWait is true and the queue could not be bound, the channel will be
+When noWait is false and the queue could not be bound, the channel will be
closed with an error.
*/
See also Delivery.Reject
*/
func (ch *Channel) Reject(tag uint64, requeue bool) error {
+ ch.m.Lock()
+ defer ch.m.Unlock()
+
return ch.send(&basicReject{
DeliveryTag: tag,
Requeue: requeue,