File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -211,26 +211,26 @@ func (l PLogger) Info(args ...interface{}) {
211211 send (l .hub , map [string ]string {uploadStatusStr : "Busy" , "Msg" : output })
212212}
213213
214- func send (hub * hub , args map [string ]string ) {
214+ func send (h * hub , args map [string ]string ) {
215215 mapB , _ := json .Marshal (args )
216- hub .broadcastSys <- mapB
216+ h .broadcastSys <- mapB
217217}
218218
219- func wsHandler (hub * hub ) * WsServer {
219+ func wsHandler (h * hub ) * WsServer {
220220 server , err := socketio .NewServer (nil )
221221 if err != nil {
222222 log .Fatal (err )
223223 }
224224
225225 server .On ("connection" , func (so socketio.Socket ) {
226226 c := & connection {send : make (chan []byte , 256 * 10 ), ws : so }
227- hub .register <- c
227+ h .register <- c
228228 so .On ("command" , func (message string ) {
229- hub .broadcast <- []byte (message )
229+ h .broadcast <- []byte (message )
230230 })
231231
232232 so .On ("disconnection" , func () {
233- hub .unregister <- c
233+ h .unregister <- c
234234 })
235235 go c .writer ()
236236 })
You can’t perform that action at this time.
0 commit comments