Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect client event listener keeps executing on failure #48

Open
pflores2704 opened this issue Jul 21, 2023 · 0 comments
Open

Connect client event listener keeps executing on failure #48

pflores2704 opened this issue Jul 21, 2023 · 0 comments

Comments

@pflores2704
Copy link

Description:
The Connect client event listener keeps triggering the event listener function even when status is failed. I can see it been useful for transfer events and keeping track of them, but I'm unsure if this is the expected behavior for the "status" event handler.

Environment:

  • @ibm-aspera/connect-sdk-js: 5.0.0
  • Node version: 18.17.0
  • Browser version: Firefox 115.0.2
  • Operating System: macOS Ventura 13.4.1

Example:

import { Connect, ConnectInstaller } from "@ibm-aspera/connect-sdk-js";

const connectClient = new Connect();
const connectInstaller = new ConnectInstaller();

function myCustomHandler(type, status) {
    if (status === 'FAILED') {
       // Handle failed status
       connectInstaller.showDownload();
   }
}
connectClient.addEventListener(“status”, myCustomHandler);

After dismissing the install dialog from the connect installer showDownload() function, the status will continue to trigger as ‘failed’ and re-open the dialog.

Expected behaviour:
Status change is triggered once.

Actual behaviour:
Status change is triggered indefinitely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant