Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

RecvLine wrong error message #626

xanatos opened this Issue Nov 9, 2011 · 1 comment


None yet
3 participants

xanatos commented Nov 9, 2011

In irc.cpp there is a function bool RecvLine(SOCKET hSocket, string& strLine)

The function, when fails, outputs messages like printf("IRC socket closed\n"); and printf("IRC recv failed: %d\n", nErr);.

Sadly that function is used even outside of IRC: from net.cpp's GetMyExternalIP2().

The easiest solution is to ignore it :-)
The easy solution is to take away the "IRC " part from the error message.
Another easy solution is to duplicate the function.
The more complex solution is to pass a parameter about the connection type to RecvLine.


laanwj commented Nov 9, 2011

If it is used outside irc.cpp it should probably not be in that file in the first place, but in util.cpp, for example. You're also right about removing the IRC from the error message.

sipa added a commit to sipa/bitcoin that referenced this issue Feb 19, 2012

Fix #626: RecvLine wrong error message
Also moved RecvLine to net.cpp.

@sipa sipa closed this in 54fee2d Jun 19, 2012

coblee pushed a commit to litecoin-project/litecoin that referenced this issue Jul 17, 2012

Fix #626: RecvLine wrong error message
Also moved RecvLine to net.cpp.

ptschip pushed a commit to ptschip/bitcoin that referenced this issue May 31, 2017

Merge pull request #626 from Justaphf/devAdvertiseAddr
[Nit] Put "advertising address" log message under the "net" debug category.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment