Fix close session bug

This commit is contained in:
Jonathan Leibiusky @xetorthio
2017-08-10 16:47:48 -03:00
parent 7c89054f16
commit 79181b2a17
2 changed files with 18 additions and 8 deletions

View File

@@ -84,12 +84,12 @@ func (p *pwd) InstanceDelete(session *types.Session, instance *types.Instance) e
return err
}
p.event.Emit(event.INSTANCE_DELETE, session.Id, instance.Name)
if err := p.storage.InstanceDelete(session.Id, instance.Name); err != nil {
return err
}
p.event.Emit(event.INSTANCE_DELETE, session.Id, instance.Name)
p.setGauges()
return nil