fix(client): don't leak connections with no keep-alive

Closes #1383
This commit is contained in:
Steven Fackler
2017-11-27 21:41:10 -08:00
parent e4864a2bea
commit d2aa5d862c
2 changed files with 44 additions and 1 deletions

View File

@@ -200,10 +200,13 @@ impl<T: Clone> KeepAlive for Pooled<T> {
};
if pool.is_enabled() {
pool.put(self.key.clone(), self.entry.clone());
} else {
trace!("keepalive disabled, dropping pooled ({:?})", self.key);
self.disable();
}
} else {
trace!("pool dropped, dropping pooled ({:?})", self.key);
self.entry.status.set(TimedKA::Disabled);
self.disable();
}
}