mirror of
https://github.com/Start9Labs/patch-db.git
synced 2026-03-26 02:11:54 +00:00
add connection monitor to sources
This commit is contained in:
committed by
Aiden McClelland
parent
209c9860c3
commit
c03c876098
@@ -1,5 +1,5 @@
|
||||
import { merge, Observable, of } from 'rxjs'
|
||||
import { concatMap, finalize, tap } from 'rxjs/operators'
|
||||
import { concatMap, tap } from 'rxjs/operators'
|
||||
import { Source } from './source/source'
|
||||
import { Store } from './store'
|
||||
import { DBCache, Http } from './types'
|
||||
@@ -22,4 +22,8 @@ export class PatchDB<T> {
|
||||
concatMap(() => of(this.store.cache)),
|
||||
)
|
||||
}
|
||||
|
||||
connectionMade$ (): Observable<void> {
|
||||
return merge(...this.sources.map(s => s.connectionMade$))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user