mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 03:18:59 +00:00
Don't initialize subscription in init()
By doing it init(), the monitor process also gets a subscription thing running, which is unnecessary (and really confused me when seeing it in the debug output).
This commit is contained in:
parent
c741465328
commit
4fb74a32cc
@ -57,14 +57,12 @@ var (
|
|||||||
lastEventRequestMut sync.Mutex
|
lastEventRequestMut sync.Mutex
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func startGUI(cfg config.GUIConfiguration, assetDir string, m *model.Model) error {
|
||||||
|
var err error
|
||||||
|
|
||||||
l.AddHandler(logger.LevelWarn, showGuiError)
|
l.AddHandler(logger.LevelWarn, showGuiError)
|
||||||
sub := events.Default.Subscribe(events.AllEvents)
|
sub := events.Default.Subscribe(events.AllEvents)
|
||||||
eventSub = events.NewBufferedSubscription(sub, 1000)
|
eventSub = events.NewBufferedSubscription(sub, 1000)
|
||||||
}
|
|
||||||
|
|
||||||
func startGUI(cfg config.GUIConfiguration, assetDir string, m *model.Model) error {
|
|
||||||
var err error
|
|
||||||
|
|
||||||
cert, err := tls.LoadX509KeyPair(locations[locHTTPSCertFile], locations[locHTTPSKeyFile])
|
cert, err := tls.LoadX509KeyPair(locations[locHTTPSCertFile], locations[locHTTPSKeyFile])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user