File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ type ComponentAPI struct {
107
107
wsmanStatusMu sync.Mutex
108
108
contentServiceStatusMu sync.Mutex
109
109
imgbldStatusMu sync.Mutex
110
+ serverStatusMu sync.Mutex
110
111
}
111
112
112
113
type EncryptionKeyMetadata struct {
@@ -285,7 +286,11 @@ func (c *ComponentAPI) GitpodServer(opts ...GitpodServerOpt) (gitpod.APIInterfac
285
286
if err != nil {
286
287
return err
287
288
}
288
- c .serverStatus .Token [options .User ] = tkn
289
+ func () {
290
+ c .serverStatusMu .Lock ()
291
+ defer c .serverStatusMu .Unlock ()
292
+ c .serverStatus .Token [options .User ] = tkn
293
+ }()
289
294
}
290
295
291
296
var pods corev1.PodList
@@ -322,7 +327,12 @@ func (c *ComponentAPI) GitpodServer(opts ...GitpodServerOpt) (gitpod.APIInterfac
322
327
return err
323
328
}
324
329
325
- c .serverStatus .Client [options .User ] = cl
330
+ func () {
331
+ c .serverStatusMu .Lock ()
332
+ defer c .serverStatusMu .Unlock ()
333
+ c .serverStatus .Client [options .User ] = cl
334
+ }()
335
+
326
336
res = cl
327
337
c .appendCloser (cl .Close )
328
338
You can’t perform that action at this time.
0 commit comments