Skip to content

Commit

Permalink
fix: tag relay with keep_alive (#2753)
Browse files Browse the repository at this point in the history
Since the auto dialer was removed, we need to tag the relay with
`KEEP_ALIVE` to reconnect to it if we disconnect.
  • Loading branch information
achingbrain authored Oct 8, 2024
1 parent d4da569 commit 8874660
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TypedEventEmitter, setMaxListeners } from '@libp2p/interface'
import { KEEP_ALIVE, TypedEventEmitter, setMaxListeners } from '@libp2p/interface'
import { PeerMap } from '@libp2p/peer-collections'
import { createBloomFilter } from '@libp2p/utils/filters'
import { PeerQueue } from '@libp2p/utils/peer-queue'
Expand Down Expand Up @@ -249,6 +249,10 @@ export class ReservationStore extends TypedEventEmitter<ReservationStoreEvents>
[RELAY_TAG]: {
value: 1,
ttl: expiration
},
[KEEP_ALIVE]: {
value: 1,
ttl: expiration
}
}
})
Expand Down

0 comments on commit 8874660

Please sign in to comment.