Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Ostroukhov <eostroukhov@chromium.org>2016-06-01 20:53:30 +0300
committerAli Ijaz Sheikh <ofrobots@google.com>2016-06-17 22:29:12 +0300
commit9dfc8b9d8e2f06903915aedfe531d0c9107f986a (patch)
treeea449eda76c087a95b3e8a1ca42ebd23bd5ec934 /src/inspector_socket.cc
parent62c8e7b922ea3e5bf7ac67a2b2b3b202d4b6b187 (diff)
inspector: fix inspector connection cleanup
In some cases close callback was called twice, while in some cases the memory was still not released at all. PR-URL: https://github.com/nodejs/node/pull/7268 Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'src/inspector_socket.cc')
-rw-r--r--src/inspector_socket.cc5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/inspector_socket.cc b/src/inspector_socket.cc
index fa2b6734e9e..b860ef3bb74 100644
--- a/src/inspector_socket.cc
+++ b/src/inspector_socket.cc
@@ -88,8 +88,6 @@ static void close_connection(inspector_socket_t* inspector) {
if (!uv_is_closing(socket)) {
uv_read_stop(reinterpret_cast<uv_stream_t*>(socket));
uv_close(socket, dispose_inspector);
- } else if (inspector->ws_state->close_cb) {
- inspector->ws_state->close_cb(inspector, 0);
}
}
@@ -276,9 +274,6 @@ static void invoke_read_callback(inspector_socket_t* inspector,
}
static void shutdown_complete(inspector_socket_t* inspector) {
- if (inspector->ws_state->close_cb) {
- inspector->ws_state->close_cb(inspector, 0);
- }
close_connection(inspector);
}