File Sharing MVP #384
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue