Commit 8dd6c4f7 authored by Brian Tiger Chow's avatar Brian Tiger Chow

fix(gcr/c) print a loud error when clients receive routing messages, but don't panic

This is an unhandled case. Right now, we close the stream without
reading. Should clients be able to satisfy routing requests?

@jbenet @whyrusleeping
parent f7dad1aa
......@@ -33,7 +33,9 @@ func Standard(h host.Host, remotes []peer.ID) Proxy {
}
func (p *standard) HandleStream(s inet.Stream) {
panic("client received a GCR message")
// TODO(brian): Should clients be able to satisfy requests?
log.Error("grandcentral client received (dropped) a routing message from", s.Conn().RemotePeer())
s.Close()
}
func (px *standard) SendMessage(ctx context.Context, m *dhtpb.Message) error {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment