Branch: refs/heads/master Home: https://github.com/btcsuite/btcd Commit: 089611a61b01c45d21163707d3e1d4bc80b28f39 https://github.com/btcsuite/btcd/commit/089611a61b01c45d21163707d3e1d4bc80b28f39 Author: Dave Collins <da...@conformal.com> Date: 2016-11-10 (Thu, 10 Nov 2016)
Changed paths: M peer/peer.go Log Message: ----------- peer: No error log on unexpected EOF. This modifies the error handling path in the peer read loop such that it will no longer log an error when the error is io.ErrUnexpectedEOF. This is being done because that error is almost always the result of a peer being remotely disconnected and thus it isn't useful information to log. However, since it might actually be due to a malformed message, a reject message is still queued up to be sent back to the peer (which will simply be discarded if the peer disconnected) before it is disconnected. While it would be ideal to only log if it's not due to a disconnect, and the code already attempts to handle that, it's not 100% possible to detect upon the read returning an error without attempting to read again which will not happen until the next loop iteration.