events.closeAll() is intended to close the WS connection, disconnect listeners and reconnect observers. However, the underlying AWSWebSocketProvider.close() method does all of the above, except for close the WS connection.
To limit the blast radius of this change, this PR only modifies the AWSAppSyncEventProvider sub class, closing the WS connection on close() and leaves the AppSyncRealTimeProvider unchanged.
Description of changes
events.closeAll()
is intended to close the WS connection, disconnect listeners and reconnect observers. However, the underlyingAWSWebSocketProvider.close()
method does all of the above, except for close the WS connection. To limit the blast radius of this change, this PR only modifies theAWSAppSyncEventProvider
sub class, closing the WS connection onclose()
and leaves the AppSyncRealTimeProvider unchanged.Issue #, if available
https://github.com/aws-amplify/amplify-js/issues/13984
Description of how you validated changes
Checklist
yarn test
passes