Remove unnecessary locking stuff, just return

This commit is contained in:
Roland Shoemaker 2015-08-04 16:54:54 -07:00
parent 8e04f64e27
commit b495fa835e
1 changed files with 2 additions and 4 deletions

View File

@ -396,11 +396,9 @@ func (rpc *AmqpRPCServer) Start(c cmd.Config) error {
if ok { if ok {
rpc.processMessage(msg) rpc.processMessage(msg)
} else { } else {
// chan has been closed by rpc.channel.Cancel
rpc.log.Info(" [!] Finished processing messages") rpc.log.Info(" [!] Finished processing messages")
rpc.dMu.Lock() return nil
rpc.done = true
rpc.dMu.Unlock()
blocking = false
} }
case err = <-closeChan: case err = <-closeChan:
rpc.connected = false rpc.connected = false