зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1411849 - Update media/audioipc to d17a7c09. r=kamidphish
This commit is contained in:
Родитель
b475e3a4da
Коммит
880b9d2455
|
@ -591,12 +591,23 @@ pub struct Server {
|
|||
conns: Slab<ServerConn>
|
||||
}
|
||||
|
||||
impl Drop for Server {
|
||||
fn drop(&mut self) {
|
||||
// ServerConns rely on the cubeb context, so we must free them
|
||||
// explicitly before the context is dropped.
|
||||
if !self.conns.is_empty() {
|
||||
debug!("dropping Server with {} live ServerConns", self.conns.len());
|
||||
self.conns.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Server {
|
||||
pub fn new(socket: UnixListener) -> Server {
|
||||
Server {
|
||||
socket: socket,
|
||||
context: None,
|
||||
conns: Slab::with_capacity(SERVER_CONN_CHUNK_SIZE)
|
||||
conns: slab::Slab::with_capacity(SERVER_CONN_CHUNK_SIZE)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче