libp2p / go-libp2p-kad-dht

A Kademlia DHT implementation on go-libp2p
https://github.com/libp2p/specs/tree/master/kad-dht
MIT License
524 stars 224 forks source link

Enhance handleNewMessage Server Mode Logging: Convert Error Logs to Debug Level #860

Closed GheisMohammadi closed 1 year ago

GheisMohammadi commented 1 year ago

The current implementation of the handleNewMessage function exclusively processes messages in server mode, generating error logs and returning false for non-server mode cases. This leads to a repetitive logging of this error message whenever the node isn't in server mode: ignoring incoming dht message while not in server mode This PR enhances the function by elevating the error log to the debug level.