ChannelSub handles a channel (FCM topic) subscription/unsubscription request.
(msg *ChannelReq)
| 178 | |
| 179 | // ChannelSub handles a channel (FCM topic) subscription/unsubscription request. |
| 180 | func ChannelSub(msg *ChannelReq) { |
| 181 | if handlers == nil { |
| 182 | return |
| 183 | } |
| 184 | |
| 185 | for _, hnd := range handlers { |
| 186 | if !hnd.IsReady() { |
| 187 | continue |
| 188 | } |
| 189 | |
| 190 | // Send without delay or skip. |
| 191 | select { |
| 192 | case hnd.Channel() <- msg: |
| 193 | default: |
| 194 | } |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | // Stop all pushes |
| 199 | func Stop() { |
no test coverage detected
searching dependent graphs…