Bug 1485660 - Avoid exceptions when the connection is closed in middle of the actor's id retrieval. r=jdescottes

MozReview-Commit-ID: KvwkISz7OVe

Depends on D7456

Differential Revision: https://phabricator.services.mozilla.com/D7457

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alexandre Poirot 2018-10-11 15:46:24 +00:00
Родитель d99221792f
Коммит e98e7b66be
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -1352,7 +1352,10 @@ Front.prototype = extend(Pool.prototype, {
} else { } else {
this.actor().then(actorID => { this.actor().then(actorID => {
packet.to = actorID; packet.to = actorID;
// The connection might be closed during the promise resolution
if (this.conn._transport) {
this.conn._transport.send(packet); this.conn._transport.send(packet);
}
}).catch(console.error); }).catch(console.error);
} }
}, },