Skip to content

Commit

Permalink
Fix running and stopping Syncthing multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
Martchus committed Apr 17, 2018
1 parent bdd181e commit 1aad99f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/syncthing/libsyncthing.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ func libst_runSyncthing(options RuntimeOptions) int {
}
C.libst_invokeLoggingCallback(C.int(level), (*C.char)(unsafe.Pointer(&runes[0])), C.size_t(len(runes)))
})

// actually run Syncthing
return runSyncthingInternal(options)
exitCode := runSyncthingInternal(options)

// reset stop (required so Syncthing can also be stopped correctly the next time we run it)
stop = make(chan int)

return exitCode
}

//export libst_runSyncthingWithConfig
Expand Down

0 comments on commit 1aad99f

Please sign in to comment.