MCPcopy
hub / github.com/mochi-mqtt/server / loadInflight

Method loadInflight

server.go:1680–1686  ·  view source on GitHub ↗

loadInflight restores inflight messages from the datastore.

(v []storage.Message)

Source from the content-addressed store, hash-verified

1678
1679// loadInflight restores inflight messages from the datastore.
1680func (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.
1689func (s *Server) loadRetained(v []storage.Message) {

Callers 2

readStoreMethod · 0.95

Calls 3

ToPacketMethod · 0.80
GetMethod · 0.65
SetMethod · 0.45

Tested by 1