Commit a173c586 authored by Kevin Di Lallo's avatar Kevin Di Lallo
Browse files

periodic notification fixes

parent 9ee8e3a7
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -461,9 +461,6 @@ func (sm *SubscriptionMgr) runTicker() {
					// Invoke periodic callback
					log.Debug("Invoking periodic callback for sub: ", sub.Cfg.Id)
					go sm.cfg.PeriodicSubCb(sub)
				} else if sub.PeriodicCounter == periodicCounterPending && sub.isReady() {
					// Handle error cases where notification was not sent
					sub.PeriodicCounter = sub.Cfg.PeriodicInterval
				}
			}
		}
+3 −3
Original line number Diff line number Diff line
@@ -76,6 +76,9 @@ func newWebsocket(cfg *WebsocketCfg) (*Websocket, error) {

func (ws *Websocket) close() {

	// Reset state
	ws.State = WsStateInit

	// Close websocket connection
	if ws.Connection != nil {
		go func() {
@@ -90,9 +93,6 @@ func (ws *Websocket) close() {
			_ = ws.Connection.Close()
		}()
	}

	// Reset state
	ws.State = WsStateInit
}

func (ws *Websocket) connectionHandler(w http.ResponseWriter, r *http.Request) {