leave must not use join options in the defer during failures

Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
Madhu Venugopal 2015-06-19 14:48:07 -07:00
parent 420c3479f3
commit bdeeda1703

View file

@ -350,7 +350,7 @@ func (ep *endpoint) Join(containerID string, options ...EndpointOption) error {
defer func() {
ep.joinLeaveEnd()
if err != nil {
if e := ep.Leave(containerID, options...); e != nil {
if e := ep.Leave(containerID); e != nil {
log.Warnf("couldnt leave endpoint : %v", ep.name, err)
}
}