diff options
author | Eugene Ostroukhov <eostroukhov@chromium.org> | 2017-01-18 03:37:09 +0300 |
---|---|---|
committer | Eugene Ostroukhov <eostroukhov@chromium.org> | 2017-01-19 22:00:09 +0300 |
commit | 295bd11468c99434ce8d8ca77af5b076bca7feb0 (patch) | |
tree | f064300f469945b316eda8fb69b02010980335e3 /src/inspector_socket_server.h | |
parent | 49902124a9d697e441dbf724aa6b26bd98f75dd0 (diff) |
test: have inspector test pick an open port
This ensures that cctest can be ran concurrently with other instances of
cctest or while the node is ran with --inspect.
Ref: https://github.com/nodejs/node/issues/10858
PR-URL: https://github.com/nodejs/node/pull/10861
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'src/inspector_socket_server.h')
-rw-r--r-- | src/inspector_socket_server.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/inspector_socket_server.h b/src/inspector_socket_server.h index d498c882a92..48ebc5353f1 100644 --- a/src/inspector_socket_server.h +++ b/src/inspector_socket_server.h @@ -39,6 +39,9 @@ class InspectorSocketServer { void Stop(ServerCallback callback); void Send(int session_id, const std::string& message); void TerminateConnections(ServerCallback callback); + int port() { + return port_; + } private: static bool HandshakeCallback(InspectorSocket* socket, @@ -62,7 +65,7 @@ class InspectorSocketServer { uv_loop_t* loop_; SocketServerDelegate* const delegate_; - const int port_; + int port_; std::string path_; uv_tcp_t server_; Closer* closer_; |