From 9f466f1bd740cce84d552c6aca0ddafabb207749 Mon Sep 17 00:00:00 2001 From: John Belmonte Date: Tue, 3 Apr 2018 14:42:59 +0900 Subject: [PATCH] disable logging on failed connect A failed connection is normal (more likely a connectivity issue than programming error) so the library should avoid logging. A real app needs to handle connectivity issues and periodically retry connections, and this logging at every attempt wouldn't be too useful. --- easywsclient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easywsclient.cpp b/easywsclient.cpp index 501d792..386b7cc 100644 --- a/easywsclient.cpp +++ b/easywsclient.cpp @@ -460,7 +460,7 @@ easywsclient::WebSocket::pointer from_url(const std::string& url, bool useMask, //fprintf(stderr, "easywsclient: connecting: host=%s port=%d path=/%s\n", host, port, path); socket_t sockfd = hostname_connect(host, port); if (sockfd == INVALID_SOCKET) { - fprintf(stderr, "Unable to connect to %s:%d\n", host, port); + //fprintf(stderr, "Unable to connect to %s:%d\n", host, port); return NULL; } {