Remove most debug prints

This commit is contained in:
Alex Hultman
2019-01-22 09:41:48 +01:00
parent 87aea5a28c
commit 85889153b9
4 changed files with 2 additions and 18 deletions
+2 -10
View File
@@ -33,7 +33,6 @@ namespace uWS {
struct Loop {
private:
static void wakeupCb(us_loop *loop) {
//std::cout << "wakeupCB called" << std::endl;
LoopData *loopData = (LoopData *) us_loop_ext(loop);
/* Swap current deferQueue */
@@ -66,10 +65,7 @@ private:
}
Loop() = delete;
~Loop() {
std::cout << "Loop destructor called" << std::endl;
}
~Loop() = default;
Loop *init() {
new (us_loop_ext((us_loop *) this)) LoopData;
@@ -111,8 +107,6 @@ public:
LoopData *loopData = (LoopData *) us_loop_ext((us_loop *) this);
loopData->~LoopData();
us_loop_free((us_loop *) this);
std::cout << "Loop::free" << std::endl;
}
/* Set postCb callback */
@@ -132,13 +126,11 @@ public:
void defer(std::function<void()> cb) {
LoopData *loopData = (LoopData *) us_loop_ext((us_loop *) this);
//std::cout << "defer called" << std::endl;
//if (std::thread::get_id() == ) // todo: add fast path for same thread id
loopData->deferMutex.lock();
loopData->deferQueues[loopData->currentDeferQueue].emplace_back(cb);
loopData->deferMutex.unlock();
//std::cout << "us_wakeup_loop called" << std::endl;
us_wakeup_loop((us_loop *) this);
}
@@ -150,7 +142,7 @@ public:
/* Passively integrate with the underlying default loop */
/* Used to seamlessly integrate with third parties such as Node.js */
void integrate() {
us_loop_integrate((us_loop *) this);
}
};
-2
View File
@@ -111,7 +111,6 @@ struct DeflationStream {
}
~DeflationStream() {
std::cout << "Destructing DeflationStream" << std::endl;
deflateEnd(&deflationStream);
}
};
@@ -124,7 +123,6 @@ struct InflationStream {
}
~InflationStream() {
std::cout << "Destructing inflationstream" << std::endl;
inflateEnd(&inflationStream);
}
-4
View File
@@ -237,8 +237,6 @@ private:
/* Handle socket disconnections */
static_dispatch(us_ssl_socket_context_on_close, us_socket_context_on_close)(getSocketContext(), [](auto *s) {
//std::cout << "close!" << std::endl;
WebSocketData *webSocketData = (WebSocketData *) (static_dispatch(us_ssl_socket_ext, us_socket_ext)(s));
webSocketData->~WebSocketData();
@@ -345,8 +343,6 @@ private:
}
void free() {
std::cout << "websocket context free" << std::endl;
WebSocketContextData<SSL> *webSocketContextData = (WebSocketContextData<SSL> *) static_dispatch(us_ssl_socket_context_ext, us_socket_context_ext)((SOCKET_CONTEXT_TYPE *) this);
webSocketContextData->~WebSocketContextData();
-2
View File
@@ -53,8 +53,6 @@ public:
}
~WebSocketData() {
std::cout << "destruting webocketdata" << std::endl;
if (deflationStream) {
delete deflationStream;
}