@@ -196,12 +196,12 @@ func loop(stray *systray.Systray, configPath *paths.Path) {
196196
197197	// var loggerWs logWriter 
198198
199- 	h  :=  NewHub (serialHub , serialPorts )
199+ 	hub  :=  NewHub (serialHub , serialPorts )
200200
201201	logger  :=  func (msg  string ) {
202202		mapD  :=  map [string ]string {"DownloadStatus" : "Pending" , "Msg" : msg }
203203		mapB , _  :=  json .Marshal (mapD )
204- 		h .broadcastSys  <-  mapB 
204+ 		hub .broadcastSys  <-  mapB 
205205	}
206206
207207	// 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) {
399399	// launch the discoveries for the running system 
400400	go  serialPorts .Run ()
401401	// launch the hub routine which is the singleton for the websocket server 
402- 	go  h .run ()
402+ 	go  hub .run ()
403403	// launch our dummy data routine 
404404	//go d.run() 
405405
406406	r  :=  gin .New ()
407407
408- 	socketHandler  :=  wsHandler (h ).ServeHTTP 
408+ 	socketHandler  :=  wsHandler (hub ).ServeHTTP 
409409
410410	extraOrigins  :=  []string {
411411		"https://create.arduino.cc" ,
@@ -444,13 +444,13 @@ func loop(stray *systray.Systray, configPath *paths.Path) {
444444	r .LoadHTMLFiles ("templates/nofirefox.html" )
445445
446446	r .GET ("/" , homeHandler )
447- 	r .POST ("/upload" , uploadHandler (h , signaturePubKey ))
447+ 	r .POST ("/upload" , uploadHandler (hub , signaturePubKey ))
448448	r .GET ("/socket.io/" , socketHandler )
449449	r .POST ("/socket.io/" , socketHandler )
450450	r .Handle ("WS" , "/socket.io/" , socketHandler )
451451	r .Handle ("WSS" , "/socket.io/" , socketHandler )
452452	r .GET ("/info" , infoHandler )
453- 	r .POST ("/pause" , PauseHandler (h , stray ))
453+ 	r .POST ("/pause" , PauseHandler (hub , stray ))
454454	r .POST ("/update" , UpdateHandler (stray ))
455455
456456	// Mount goa handlers 
0 commit comments