File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ interface StateResponse {
5555
5656const STORAGE_KEY = 'npmx-connector'
5757const DEFAULT_PORT = 31415
58+ const CONNECT_TIMEOUT_MS = 30000
5859
5960export const useConnector = createSharedComposable ( function useConnector ( ) {
6061 const { settings } = useSettings ( )
@@ -115,7 +116,7 @@ export const useConnector = createSharedComposable(function useConnector() {
115116 const response = await $fetch < ConnectResponse > ( `http://127.0.0.1:${ port } /connect` , {
116117 method : 'POST' ,
117118 body : { token } ,
118- timeout : 5000 ,
119+ timeout : CONNECT_TIMEOUT_MS ,
119120 } )
120121
121122 if ( response . success && response . data ) {
@@ -180,7 +181,7 @@ export const useConnector = createSharedComposable(function useConnector() {
180181 headers : {
181182 Authorization : `Bearer ${ config . value . token } ` ,
182183 } ,
183- timeout : 5000 ,
184+ timeout : CONNECT_TIMEOUT_MS ,
184185 } )
185186
186187 if ( response . success && response . data ) {
You can’t perform that action at this time.
0 commit comments