From 9b87dc488048900a8cd684f51ddc98143682dbc3 Mon Sep 17 00:00:00 2001 From: John Belmonte Date: Wed, 14 Mar 2018 14:00:24 +0900 Subject: [PATCH] remove debug output The library is writing to stderr on normal conditions (about to connect, connected), which is likely not desired by library user. If it has important use cases, consider restoring the output under compile or runtime control. --- easywsclient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easywsclient.cpp b/easywsclient.cpp index 260ea69..501d792 100644 --- a/easywsclient.cpp +++ b/easywsclient.cpp @@ -457,7 +457,7 @@ easywsclient::WebSocket::pointer from_url(const std::string& url, bool useMask, fprintf(stderr, "ERROR: Could not parse WebSocket url: %s\n", url.c_str()); return NULL; } - fprintf(stderr, "easywsclient: connecting: host=%s port=%d path=/%s\n", host, port, path); + //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); @@ -501,7 +501,7 @@ easywsclient::WebSocket::pointer from_url(const std::string& url, bool useMask, #else fcntl(sockfd, F_SETFL, O_NONBLOCK); #endif - fprintf(stderr, "Connected to: %s\n", url.c_str()); + //fprintf(stderr, "Connected to: %s\n", url.c_str()); return easywsclient::WebSocket::pointer(new _RealWebSocket(sockfd, useMask)); }