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 {
rpc.processMessage(msg)
} else {
// chan has been closed by rpc.channel.Cancel
rpc.log.Info(" [!] Finished processing messages")
rpc.dMu.Lock()
rpc.done = true
rpc.dMu.Unlock()
blocking = false
return nil
}
case err = <-closeChan:
rpc.connected = false