|
@@ -320,9 +320,11 @@ func (cm *ChannelManager) Rename(name string, newName string) (err error) {
|
320
|
320
|
defer func() {
|
321
|
321
|
if channel != nil && info.Founder != "" {
|
322
|
322
|
channel.Store(IncludeAllAttrs)
|
323
|
|
- // we just flushed the channel under its new name, therefore this delete
|
324
|
|
- // cannot be overwritten by a write to the old name:
|
325
|
|
- cm.server.channelRegistry.Delete(info)
|
|
323
|
+ if oldCfname != newCfname {
|
|
324
|
+ // we just flushed the channel under its new name, therefore this delete
|
|
325
|
+ // cannot be overwritten by a write to the old name:
|
|
326
|
+ cm.server.channelRegistry.Delete(info)
|
|
327
|
+ }
|
326
|
328
|
}
|
327
|
329
|
}()
|
328
|
330
|
|