File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Providers/AWSAppSyncEventsProvider Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ export class AWSAppSyncEventProvider extends AWSWebSocketProvider {
79
79
}
80
80
81
81
public closeIfNoActiveChannel ( ) {
82
- setTimeout ( this . _closeSocketIfRequired . bind ( this ) , 1000 ) ;
82
+ this . _closeSocketIfRequired ( ) ;
83
83
}
84
84
85
85
protected async _prepareSubscriptionPayload ( {
Original file line number Diff line number Diff line change @@ -101,9 +101,11 @@ async function connect(
101
101
const close = async ( ) => {
102
102
_subscription && _subscription . unsubscribe ( ) ;
103
103
openChannels . delete ( channelId ) ;
104
- if ( openChannels . size === 0 ) {
105
- eventProvider . closeIfNoActiveChannel ( ) ;
106
- }
104
+ setTimeout ( ( ) => {
105
+ if ( openChannels . size === 0 ) {
106
+ eventProvider . closeIfNoActiveChannel ( ) ;
107
+ }
108
+ } , 1000 ) ;
107
109
} ;
108
110
109
111
return {
You can’t perform that action at this time.
0 commit comments