@@ -196,12 +196,12 @@ func loop(stray *systray.Systray, configPath *paths.Path) {
196
196
197
197
// var loggerWs logWriter
198
198
199
- h := NewHub (serialHub , serialPorts )
199
+ hub := NewHub (serialHub , serialPorts )
200
200
201
201
logger := func (msg string ) {
202
202
mapD := map [string ]string {"DownloadStatus" : "Pending" , "Msg" : msg }
203
203
mapB , _ := json .Marshal (mapD )
204
- h .broadcastSys <- mapB
204
+ hub .broadcastSys <- mapB
205
205
}
206
206
207
207
// if the default browser is Safari, prompt the user to install HTTPS certificates
@@ -399,13 +399,13 @@ func loop(stray *systray.Systray, configPath *paths.Path) {
399
399
// launch the discoveries for the running system
400
400
go serialPorts .Run ()
401
401
// launch the hub routine which is the singleton for the websocket server
402
- go h .run ()
402
+ go hub .run ()
403
403
// launch our dummy data routine
404
404
//go d.run()
405
405
406
406
r := gin .New ()
407
407
408
- socketHandler := wsHandler (h ).ServeHTTP
408
+ socketHandler := wsHandler (hub ).ServeHTTP
409
409
410
410
extraOrigins := []string {
411
411
"https://create.arduino.cc" ,
@@ -444,13 +444,13 @@ func loop(stray *systray.Systray, configPath *paths.Path) {
444
444
r .LoadHTMLFiles ("templates/nofirefox.html" )
445
445
446
446
r .GET ("/" , homeHandler )
447
- r .POST ("/upload" , uploadHandler (h , signaturePubKey ))
447
+ r .POST ("/upload" , uploadHandler (hub , signaturePubKey ))
448
448
r .GET ("/socket.io/" , socketHandler )
449
449
r .POST ("/socket.io/" , socketHandler )
450
450
r .Handle ("WS" , "/socket.io/" , socketHandler )
451
451
r .Handle ("WSS" , "/socket.io/" , socketHandler )
452
452
r .GET ("/info" , infoHandler )
453
- r .POST ("/pause" , PauseHandler (h , stray ))
453
+ r .POST ("/pause" , PauseHandler (hub , stray ))
454
454
r .POST ("/update" , UpdateHandler (stray ))
455
455
456
456
// Mount goa handlers
0 commit comments