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
Brian Tiger Chow committed
Jan 29, 2015 at 23:47 UTC
4a9ae80791ad72f63d1970b8c5fe645d891ccb5b
1 file changed
+3
-1
routing/grandcentral/proxy/standard.go
+3
-1
@@ -33,7 +33,9 @@ func Standard(h host.Host, remotes []peer.ID) Proxy {
33
}
34
35
func (p *standard) HandleStream(s inet.Stream) {
36
- panic("client received a GCR message")
36
+ // TODO(brian): Should clients be able to satisfy requests?
37
+ log.Error("grandcentral client received (dropped) a routing message from", s.Conn().RemotePeer())
38
+ s.Close()
39
}
40
41
func (px *standard) SendMessage(ctx context.Context, m *dhtpb.Message) error {