Make sure instances have unique names.

Make sure we don't return an old docker client.
This commit is contained in:
Jonathan Leibiusky @xetorthio
2017-09-13 19:25:21 -03:00
parent d566e5ee05
commit c4859e13bf
2 changed files with 3 additions and 2 deletions

View File

@@ -58,7 +58,7 @@ func (f *localCachedFactory) GetForSession(sessionId string) (DockerApi, error)
}
func (f *localCachedFactory) GetForInstance(instance *types.Instance) (DockerApi, error) {
key := instance.SessionId + instance.IP
key := instance.Name
f.irw.Lock()
c, found := f.instanceClients[key]