question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature suggestion: parent/child connection timeout should reject promise

See original GitHub issue

As far as I can see if I run child sand-alone and I make an attempt to connect to the parent the promise stays pending indefinitely.

It’s super-easy to detect “just” running stand-alone in child (by checking if window.parent !== window), but it becomes harder if connection was not properly established (for any reason in fact)

Currently I use Promise.race for that but it seems like a reasonable thing to have it baked in.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
Aaroniuscommented, Nov 10, 2017

Alright, I’ve published this on the next dist-tag as 3.0.0-alpha.3. You can try it out via npm install penpal@next or npm install penpal@3.0.0-alpha.3.

Give it a shot and let me know how it works for you. You can find the timeout option in the readme here: https://github.com/Aaronius/penpal/tree/v3

0reactions
Aaroniuscommented, Nov 22, 2017

Published in 3.0.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add timeout to a Promise in Javascript
A reusable script to add timeout functionality to any async operation. ... it will wait until the Promise is either resolved or rejected....
Read more >
NetSuite Applications Suite - https.request.promise(options)
Available to Promise Earliest Availability ... Types of Relationships Between Parent-Child Record Instances · Custom Record Type Fields that Affect ...
Read more >
Parent-child topology deployment using the MEP protocol
A child site can accept or reject the connection after evaluating its existing connections and the information in the backup list.
Read more >
How to reject promise on d3 xhr request timeout?
I want to set a timeout value so that if the server does not respond in that particular time frame then UI should...
Read more >
Corporal Punishment by Parents and Associated Child ...
The connec- tion between criminal and antisocial behavior in childhood and adulthood is examined here in separate meta-analyses. Quality of the Parent–Child ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found