Skip to content

Commit

Permalink
fix: stream fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammeds1992 committed Nov 6, 2024
1 parent 2918445 commit 7f6dd8c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/restapi/src/lib/pushstream/PushStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ export class PushStream extends EventEmitter {

if (this.pushChatSocket) {
console.log('RestAPI::PushStream::s-1');
checkAndEmitConnectEvent();
this.pushChatSocket.off(EVENTS.CONNECT);
this.pushChatSocket.on(EVENTS.CONNECT, async () => {
console.log('RestAPI::PushStream::s-2');
Expand Down Expand Up @@ -506,6 +507,8 @@ export class PushStream extends EventEmitter {
}

if (this.pushNotificationSocket) {
checkAndEmitConnectEvent();
console.log('RestAPI::PushStream::s-4.9');
this.pushNotificationSocket.off(EVENTS.CONNECT);
this.pushNotificationSocket.on(EVENTS.CONNECT, async () => {
console.log('RestAPI::PushStream::s-5');
Expand Down Expand Up @@ -637,10 +640,10 @@ export class PushStream extends EventEmitter {
}
}

public info() {
public info(): { options: PushStreamInitializeProps; listen: STREAM[] } {
return {
options: this.options,
listen: this.listen,
listen: this.listen as STREAM[],
};
}

Expand Down

0 comments on commit 7f6dd8c

Please sign in to comment.