@@ -17,6 +17,7 @@ import { HttpClient, HttpForm } from "./http";
1717import EventSource from "eventsource" ;
1818import { Content , ContentSerdes , ProtocolHelpers , createLoggers } from "@node-wot/core" ;
1919import { Readable } from "stream" ;
20+ import { AbortSignal } from "node-fetch/externals" ;
2021
2122const { debug } = createLoggers ( "binding-http" , "subscription-protocols" ) ;
2223
@@ -47,7 +48,7 @@ export class LongPollingSubscription implements InternalSubscription {
4748 if ( handshake ) {
4849 const headRequest = await this . client [ "generateFetchRequest" ] ( this . form , "HEAD" , {
4950 timeout : 1000 ,
50- signal : this . abortController . signal ,
51+ signal : this . abortController . signal as AbortSignal ,
5152 } ) ;
5253 const result = await this . client [ "fetch" ] ( headRequest ) ;
5354 if ( result . ok ) resolve ( ) ;
@@ -56,7 +57,7 @@ export class LongPollingSubscription implements InternalSubscription {
5657 // long timeout for long polling
5758 const request = await this . client [ "generateFetchRequest" ] ( this . form , "GET" , {
5859 timeout : 60 * 60 * 1000 ,
59- signal : this . abortController . signal ,
60+ signal : this . abortController . signal as AbortSignal ,
6061 } ) ;
6162 debug ( `HttpClient (subscribeResource) sending ${ request . method } to ${ request . url } ` ) ;
6263
0 commit comments