Skip to content

Commit 9c690e0

Browse files
authored
Update useConnection.ts
1 parent 027eb02 commit 9c690e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

client/src/lib/hooks/useConnection.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ import { Notification, StdErrNotificationSchema } from "../notificationTypes";
2626
import { auth } from "@modelcontextprotocol/sdk/client/auth.js";
2727
import { authProvider } from "../auth";
2828

29-
const DEFAULT_REQUEST_TIMEOUT_MSEC = 10000;
29+
const params = new URLSearchParams(window.location.search);
30+
const DEFAULT_REQUEST_TIMEOUT_MSEC =
31+
parseInt(params.get("timeout") ?? "") || 10000;
3032

3133
interface UseConnectionOptions {
3234
transportType: "stdio" | "sse";

0 commit comments

Comments
 (0)