Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

feat: switch to server mode automatically when addresses change #473

Merged
merged 4 commits into from
May 9, 2023

Conversation

achingbrain
Copy link
Member

If the node is in client mode, and the self:peer:update event is emitted, and the event detail contains publicly routable addresses, switch to server mode.

If the event is emitted and we are in server mode and the event detail contains only private addresses, switch back to client mode.

If the node is in client mode, and the `self:peer:update` event is
emitted, and the event detail contains publicly routable addresses,
switch to server mode.

If the event is emitted and we are in server mode and the event detail
contains only private addresses, switch back to client mode.
Copy link
Member

@maschad maschad left a comment

Choose a reason for hiding this comment

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

Looks good but left a suggestion

src/dual-kad-dht.ts Show resolved Hide resolved
@achingbrain achingbrain merged commit de51cbe into master May 9, 2023
@achingbrain achingbrain deleted the feat/switch-to-server-mode-automatically branch May 9, 2023 08:07
github-actions bot pushed a commit that referenced this pull request May 9, 2023
## [9.3.0](v9.2.0...v9.3.0) (2023-05-09)

### Features

* switch to server mode automatically when addresses change ([#473](#473)) ([de51cbe](de51cbe))
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