229
*/
230
registerAuthority(authority: string, connection: IRemoteFilesystemConnection): IDisposable {
232
>
if (!entry) {
233
>
entry = {
234
>
connections: [connection],
235
>
expiry: new MutableDisposable<IDisposable>(),
236
>
};
237
>
this._authorities.set(authority, entry);
238
>
} else {
239
entry.expiry.clear();
240
entry.connections.push(connection);
241
}
243
>
this._onDidChangeConnection.fire(authority);
244
>
245
>
return toDisposable(() => {
246
>
const idx = adopted.connections.indexOf(connection);
247
>
if (idx === -1) {
248
return;
249
}