Skip to content

Commit 2b1b2ca

Browse files
author
Simple-Tracker
committed
Bug fix
1 parent af9d7bb commit 2b1b2ca

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

SyncServer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func TestSyncWithServerPrepareJSON(t *testing.T) {
3737
}
3838

3939
var body SyncServer_SubmitStruct
40-
if err := json.Unmarshal(payload, &body); err != nil {
40+
if err := json.Unmarshal([]byte(payload), &body); err != nil {
4141
t.Fatalf("failed to decode payload: %v", err)
4242
}
4343
if body.Version != 1 {

main_windows.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func RegSysTray() {
4949
}
5050

5151
systray.Run(func() {
52-
defer RecoverAndStop("RegSysTray.onReady")
52+
defer RecoverAndStop("RegSysTray.onReady", true)
5353

5454
systray.SetIcon(icon_Windows)
5555
systray.SetTitle(programName)
@@ -67,12 +67,12 @@ func RegSysTray() {
6767
}
6868
})
6969
}, func() {
70-
defer RecoverAndStop("RegSysTray.onExit")
70+
defer RecoverAndStop("RegSysTray.onExit", true)
7171
ReqStop()
7272
})
7373
}
7474
func main() {
75-
defer RecoverAndStop("main_windows")
75+
defer RecoverAndStop("main_windows", true)
7676

7777
if PrepareEnv() {
7878
if needHideWindow && showWindow {

0 commit comments

Comments
 (0)