diff --git a/channel.go b/channel.go
index <HASH>..<HASH> 100644
--- a/channel.go
+++ b/channel.go
@@ -274,8 +274,8 @@ func (ch *Channel) sendOpen(msg message) (err error) {
 func (ch *Channel) dispatch(msg message) {
 	switch m := msg.(type) {
 	case *channelClose:
-		ch.connection.closeChannel(ch, newError(m.ReplyCode, m.ReplyText))
 		ch.send(&channelCloseOk{})
+		ch.connection.closeChannel(ch, newError(m.ReplyCode, m.ReplyText))
 
 	case *channelFlow:
 		ch.notifyM.RLock()
First send a channel.close-ok, then release local resources

This way if a channel with the same ID is opened concurrently,
the server will first see a channel.close-ok for it and release it.

This is the same idea as #<I>.