File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
packages/app/src/app/overmind/effects/vscode/extensionHostWorker/common Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,17 @@ export async function initializeBrowserFS({
117117 }
118118
119119 if ( syncSandbox ) {
120+ // Resolve after 3s, if it doesn't resolve, vscode won't be able to resolve the ext host
121+ // and it won't try to reconnect.
122+ const timeout = setTimeout ( ( ) => {
123+ resolve ( ) ;
124+ } , 3000 ) ;
125+
126+ const callResolve = ( ) => {
127+ clearTimeout ( timeout ) ;
128+ resolve ( ) ;
129+ } ;
130+
120131 self . addEventListener ( 'message' , evt => {
121132 // Some messages are specific to this worker
122133 if ( ! evt . data . $fs_ids || ! evt . data . $fs_ids . includes ( fsId ) ) {
@@ -142,7 +153,7 @@ export async function initializeBrowserFS({
142153 touchFileSystem ( ) ;
143154 if ( isInitialSync ) {
144155 isInitialSync = false ;
145- resolve ( ) ;
156+ callResolve ( ) ;
146157 }
147158 break ;
148159 }
@@ -170,7 +181,7 @@ export async function initializeBrowserFS({
170181 $data : { } ,
171182 } ) ;
172183 } else {
173- resolve ( ) ;
184+ callResolve ( ) ;
174185 }
175186 break ;
176187 }
You can’t perform that action at this time.
0 commit comments