add error handling

This commit is contained in:
Pascal Fischer 2024-08-14 10:46:44 +02:00
parent 96793950ac
commit edd992857b

View File

@ -114,7 +114,10 @@ func (s *Server) ConnectStream(stream proto.SignalExchange_ConnectStreamServer)
log.Debugf("Received a response from peer [%s] to peer [%s]", msg.Key, msg.RemoteKey)
s.dispatcher.SendMessage(stream.Context(), msg)
_, err = s.dispatcher.SendMessage(stream.Context(), msg)
if err != nil {
log.Debugf("error while sending message from peer [%s] to peer [%s] %v", msg.Key, msg.RemoteKey, err)
}
}
<-stream.Context().Done()