loadInflight restores inflight messages from the datastore.
(v []storage.Message)
| 1678 | |
| 1679 | // loadInflight restores inflight messages from the datastore. |
| 1680 | func (s *Server) loadInflight(v []storage.Message) { |
| 1681 | for _, msg := range v { |
| 1682 | if client, ok := s.Clients.Get(msg.Client); ok { |
| 1683 | client.State.Inflight.Set(msg.ToPacket()) |
| 1684 | } |
| 1685 | } |
| 1686 | } |
| 1687 | |
| 1688 | // loadRetained restores retained messages from the datastore. |
| 1689 | func (s *Server) loadRetained(v []storage.Message) { |