File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { extractEnvVariable } from './utils';
4
4
const BaseOptionsSchema = z . object ( {
5
5
iconPath : z . string ( ) . optional ( ) ,
6
6
timeout : z . number ( ) . optional ( ) ,
7
+ initTimeout : z . number ( ) . optional ( ) ,
7
8
} ) ;
8
9
9
10
export const StdioOptionsSchema = BaseOptionsSchema . extend ( {
Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ export class MCPConnection extends EventEmitter {
269
269
this . transport = this . constructTransport ( this . options ) ;
270
270
this . setupTransportDebugHandlers ( ) ;
271
271
272
- const connectTimeout = 10000 ;
272
+ const connectTimeout = this . options . initTimeout ?? 10000 ;
273
273
await Promise . race ( [
274
274
this . client . connect ( this . transport ) ,
275
275
new Promise ( ( _resolve , reject ) =>
You can’t perform that action at this time.
0 commit comments