Skip to content
This repository was archived by the owner on Mar 11, 2020. It is now read-only.

feat: add support for timeline proxying #31

Merged
merged 1 commit into from
Oct 17, 2019
Merged

Conversation

jacobheun
Copy link
Contributor

In Libp2p we need to know when a connection has closed, as it allows us to do a variety of clean up tasks, notifications, etc. Rather than passing additional handlers to be able to know when the connection has closed, this simply removes the stat.timeline destructuring in the constructor to allow Proxies to work properly. As shown in the tests, this enables us to create custom handlers when certain properties change, namely timeline.close. When the value is set by the MultiaddrConnection, we can perform any actions the rest of the system needs.

Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Cool approach 👌

@jacobheun jacobheun merged commit 541bf83 into master Oct 17, 2019
@jacobheun jacobheun deleted the feat/timeline-proxy branch October 17, 2019 12:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants