disallow squatting a registered channel name via RENAME

This commit is contained in:
Shivaram Lingamneni 2019-03-12 05:01:08 -04:00
parent 63029e2ff5
commit 8a11768c6a
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ func (cm *ChannelManager) Rename(name string, newname string) (err error) {
cm.Lock() cm.Lock()
defer cm.Unlock() defer cm.Unlock()
if cm.chans[cfnewname] != nil { if cm.chans[cfnewname] != nil || cm.registeredChannels[cfnewname] {
return errChannelNameInUse return errChannelNameInUse
} }
entry := cm.chans[cfname] entry := cm.chans[cfname]