File tree 3 files changed +5
-7
lines changed
3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 169
169
"@chainsafe/is-ip" : " ^2.0.1" ,
170
170
"@chainsafe/netmask" : " ^2.0.0" ,
171
171
"@libp2p/interface" : " ^1.0.0" ,
172
- "@multiformats/dns" : " ^1.0.1 " ,
172
+ "@multiformats/dns" : " ^1.0.3 " ,
173
173
"multiformats" : " ^13.0.0" ,
174
- "race-signal" : " ^1.0.2" ,
175
174
"uint8-varint" : " ^2.0.1" ,
176
175
"uint8arrays" : " ^5.0.0"
177
176
},
Original file line number Diff line number Diff line change 1
1
import { CodeError } from '@libp2p/interface'
2
2
import { dns , RecordType } from '@multiformats/dns'
3
- import { raceSignal } from 'race-signal'
4
3
import { multiaddr } from '../index.js'
5
4
import { getProtocol } from '../protocols-table.js'
6
5
import type { Resolver } from './index.js'
@@ -25,7 +24,7 @@ export interface DNSADDROptions extends AbortOptions {
25
24
maxRecursiveDepth ?: number
26
25
}
27
26
28
- export const dnsaddrResolver : Resolver < DNSADDROptions > = async function dnsaddr ( ma : Multiaddr , options : DNSADDROptions = { } ) : Promise < string [ ] > {
27
+ export const dnsaddrResolver : Resolver < DNSADDROptions > = async function dnsaddrResolver ( ma : Multiaddr , options : DNSADDROptions = { } ) : Promise < string [ ] > {
29
28
const recursionLimit = options . maxRecursiveDepth ?? MAX_RECURSIVE_DEPTH
30
29
31
30
if ( recursionLimit === 0 ) {
@@ -35,12 +34,12 @@ export const dnsaddrResolver: Resolver<DNSADDROptions> = async function dnsaddr
35
34
const [ , hostname ] = ma . stringTuples ( ) . find ( ( [ proto ] ) => proto === dnsaddrCode ) ?? [ ]
36
35
37
36
const resolver = options ?. dns ?? dns ( )
38
- const result = await raceSignal ( resolver . query ( `_dnsaddr.${ hostname } ` , {
37
+ const result = await resolver . query ( `_dnsaddr.${ hostname } ` , {
39
38
signal : options ?. signal ,
40
39
types : [
41
40
RecordType . TXT
42
41
]
43
- } ) , options . signal )
42
+ } )
44
43
45
44
const peerId = ma . getPeerId ( )
46
45
const output : string [ ] = [ ]
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ describe('multiaddr resolve', () => {
129
129
130
130
controller . abort ( )
131
131
132
- await expect ( resolvePromise ) . to . eventually . be . rejected ( ) . with . property ( 'code' , 'ABORT_ERR' )
132
+ await expect ( resolvePromise ) . to . eventually . be . rejected ( )
133
133
} )
134
134
135
135
it ( 'should abort resolving deeply nested records' , async ( ) => {
You can’t perform that action at this time.
0 commit comments