Skip to content

Commit

Permalink
fix: added logs
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammeds1992 committed Nov 6, 2024
1 parent d233844 commit 2918445
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/restapi/src/lib/pushstream/PushStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ export class PushStream extends EventEmitter {
'RestAPI::PushStream::connect - Emitted STREAM.CONNECT'
);
resolve();
} else {
console.log('RestAPI::PushStream::s-7');
}
};

Expand Down Expand Up @@ -331,11 +333,14 @@ export class PushStream extends EventEmitter {
};

if (this.pushChatSocket) {
console.log('RestAPI::PushStream::s-1');
this.pushChatSocket.off(EVENTS.CONNECT);
this.pushChatSocket.on(EVENTS.CONNECT, async () => {
console.log('RestAPI::PushStream::s-2');
isChatSocketConnected = true;
this.chatSocketCount++;
this.chatSocketConnected = true;
console.log('RestAPI::PushStream::s-3');
checkAndEmitConnectEvent();
console.log(
`RestAPI::PushStream::EVENTS.CONNECT::Chat Socket Connected (ID: ${this.pushChatSocket.id})`
Expand All @@ -344,6 +349,7 @@ export class PushStream extends EventEmitter {

this.pushChatSocket.off(EVENTS.DISCONNECT);
this.pushChatSocket.on(EVENTS.DISCONNECT, async () => {
console.log('RestAPI::PushStream::s-4');
console.log(
'RestAPI::PushStream::ChatSocket::Disconnect - Chat socket disconnected.'
);
Expand Down Expand Up @@ -502,6 +508,8 @@ export class PushStream extends EventEmitter {
if (this.pushNotificationSocket) {
this.pushNotificationSocket.off(EVENTS.CONNECT);
this.pushNotificationSocket.on(EVENTS.CONNECT, async () => {
console.log('RestAPI::PushStream::s-5');

console.log(
`RestAPI::PushStream::NotifSocket::Connect - Notification Socket Connected (ID: ${this.pushNotificationSocket.id})`
);
Expand All @@ -513,6 +521,8 @@ export class PushStream extends EventEmitter {

this.pushNotificationSocket.off(EVENTS.DISCONNECT);
this.pushNotificationSocket.on(EVENTS.DISCONNECT, async () => {
console.log('RestAPI::PushStream::s-6');

console.log(
'RestAPI::PushStream::NotifSocket::Disconnect - Notification socket disconnected.'
);
Expand Down

0 comments on commit 2918445

Please sign in to comment.