From 19088c17348891d7714cd6e773b0d197b72805b3 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Fri, 3 Sep 2021 12:32:47 -0700 Subject: [PATCH] Report debug of plaintext length --- protocol/connections/engine.go | 1 + protocol/connections/peerapp.go | 1 + 2 files changed, 2 insertions(+) diff --git a/protocol/connections/engine.go b/protocol/connections/engine.go index 0067384..d1ab595 100644 --- a/protocol/connections/engine.go +++ b/protocol/connections/engine.go @@ -594,6 +594,7 @@ func (e *engine) sendPeerMessage(handle string, message model3.PeerMessage) erro if ok { return peerApp.SendMessage(message) } + log.Errorf("could not send peer message: %v", err) return fmt.Errorf("could not find peer app to send message to: %v", handle) } log.Errorf("could not send peer message: %v", err) diff --git a/protocol/connections/peerapp.go b/protocol/connections/peerapp.go index f884314..c8b6539 100644 --- a/protocol/connections/peerapp.go +++ b/protocol/connections/peerapp.go @@ -114,6 +114,7 @@ func (pa *PeerApp) SendMessage(message model2.PeerMessage) error { } serialized, err := json.Marshal(message) if err == nil { + log.Debugf("sending plaintext of length %v", len(serialized)) pa.connection.Send(serialized) return nil }