Skip to content

Commit 8874660

Browse files
authored
fix: tag relay with keep_alive (#2753)
Since the auto dialer was removed, we need to tag the relay with `KEEP_ALIVE` to reconnect to it if we disconnect.
1 parent d4da569 commit 8874660

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/transport-circuit-relay-v2/src/transport/reservation-store.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TypedEventEmitter, setMaxListeners } from '@libp2p/interface'
1+
import { KEEP_ALIVE, TypedEventEmitter, setMaxListeners } from '@libp2p/interface'
22
import { PeerMap } from '@libp2p/peer-collections'
33
import { createBloomFilter } from '@libp2p/utils/filters'
44
import { PeerQueue } from '@libp2p/utils/peer-queue'
@@ -249,6 +249,10 @@ export class ReservationStore extends TypedEventEmitter<ReservationStoreEvents>
249249
[RELAY_TAG]: {
250250
value: 1,
251251
ttl: expiration
252+
},
253+
[KEEP_ALIVE]: {
254+
value: 1,
255+
ttl: expiration
252256
}
253257
}
254258
})

0 commit comments

Comments
 (0)