mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-22 16:48:23 +01:00
Run release check in the background when toggling the setting (#169)
* Run release check in the background when toggling the setting * change var name * use new err variable
This commit is contained in:
parent
03b1e410e7
commit
226699732d
@ -4106,10 +4106,14 @@ func ReleaseCheckOnCommand(ctx context.Context, pk *scpacket.FeCommandPacketType
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = runReleaseCheck(ctx, true)
|
||||
if err != nil {
|
||||
log.Printf("error checking for new release after enabling auto release check: %v\n", err)
|
||||
}
|
||||
go func() {
|
||||
releaseCheckCtx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancelFn()
|
||||
releaseCheckErr := runReleaseCheck(releaseCheckCtx, true)
|
||||
if releaseCheckErr != nil {
|
||||
log.Printf("error checking for new release after enabling auto release check: %v\n", releaseCheckErr)
|
||||
}
|
||||
}()
|
||||
|
||||
clientData, err = sstore.EnsureClientData(ctx)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user