scheduler: don't leak offers if one out of many is incompatible

Fixes https://github.com/mesosphere/kubernetes-mesos/issues/636

Bugfix by @luckyfengyong
This commit is contained in:
Dr. Stefan Schimanski
2015-11-23 12:54:21 +01:00
parent ffe8370927
commit bf532e5ce2

View File

@@ -242,7 +242,7 @@ func (s *offerStorage) Add(offers []*mesos.Offer) {
offerId := offer.Id.GetValue()
log.V(3).Infof("Declining incompatible offer %v", offerId)
s.declineOffer(offerId, offer.GetHostname(), metrics.OfferCompat)
return
continue
}
timed := &liveOffer{
Offer: offer,