diff --git a/protocol/connections/peerapp.go b/protocol/connections/peerapp.go index 59332b6..55d8706 100644 --- a/protocol/connections/peerapp.go +++ b/protocol/connections/peerapp.go @@ -89,6 +89,7 @@ func (pa *PeerApp) listen() { case event.ContextAck: pa.OnAcknowledgement(pa.connection.Hostname(), peerMessage.ID) case event.ContextRetVal: + log.Infof("Loading from map %x", pa.getValRequests) req, ok := pa.getValRequests.Load(peerMessage.ID) if ok { reqStr := []byte(req.(string)) @@ -112,6 +113,7 @@ func (pa *PeerApp) listen() { // NOTE: This is a stub, we will likely want to extend this to better reflect the desired protocol func (pa *PeerApp) SendMessage(message model2.PeerMessage) error { if message.Context == event.ContextGetVal { + log.Infof("Saving to map %x", pa.getValRequests) pa.getValRequests.Store(message.ID, string(message.Data)) // sync map is apparently not guaranteed to be consistent _, ok := pa.getValRequests.Load(message.ID)