Update FeedService to use direct connection status check
- Changed the connection status check in FeedService from an asynchronous health check to a direct property access on relayHub. - Added a console log to output the current connection status for better debugging and monitoring. These changes improve the efficiency of the connection status verification process in the FeedService.
This commit is contained in:
parent
6217e3b70a
commit
a5e6c301e1
1 changed files with 2 additions and 1 deletions
|
|
@ -290,7 +290,8 @@ export class FeedService extends BaseService {
|
||||||
|
|
||||||
// Check if we need to reconnect
|
// Check if we need to reconnect
|
||||||
if (this.currentConfig && this.relayHub) {
|
if (this.currentConfig && this.relayHub) {
|
||||||
const isConnected = await this.relayHub.checkHealth()
|
const isConnected = this.relayHub.isConnected.value
|
||||||
|
console.log('FeedService: RelayHub connection status:', isConnected)
|
||||||
if (!isConnected) {
|
if (!isConnected) {
|
||||||
console.log('FeedService: Reconnecting after resume')
|
console.log('FeedService: Reconnecting after resume')
|
||||||
await this.subscribeFeed(this.currentConfig)
|
await this.subscribeFeed(this.currentConfig)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue