pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/nodejs/node/commit/6e2c29bcabb0507262167494a1fd9bc583cae690

mer-b69241e157469407.css" /> inspector: perform DNS lookup for host · nodejs/node@6e2c29b · GitHub
Skip to content

Commit 6e2c29b

Browse files
author
Eugene Ostroukhov
committed
inspector: perform DNS lookup for host
PR-URL: #13478 Fixes: #13477 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent b7473c2 commit 6e2c29b

File tree

7 files changed

+343
-163
lines changed

7 files changed

+343
-163
lines changed

src/inspector_agent.cc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -702,13 +702,7 @@ void Url(const FunctionCallbackInfo<Value>& args) {
702702

703703
if (ids.empty()) return;
704704

705-
std::string url = "ws://";
706-
url += io->host();
707-
url += ":";
708-
url += std::to_string(io->port());
709-
url += "/";
710-
url += ids[0];
711-
705+
std::string url = FormatWsAddress(io->host(), io->port(), ids[0], true);
712706
args.GetReturnValue().Set(OneByteString(env->isolate(), url.c_str()));
713707
}
714708

src/inspector_io.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ void InspectorIo::ThreadMain() {
313313
uv_sem_post(&thread_start_sem_);
314314
return;
315315
}
316-
port_ = server.port(); // Safe, main thread is waiting on semaphore.
316+
port_ = server.Port(); // Safe, main thread is waiting on semaphore.
317317
if (!wait_for_connect_) {
318318
uv_sem_post(&thread_start_sem_);
319319
}

src/inspector_io.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ class StringView;
2828
namespace node {
2929
namespace inspector {
3030

31+
std::string FormatWsAddress(const std::string& host, int port,
32+
const std::string& target_id,
33+
bool include_protocol);
34+
3135
class InspectorIoDelegate;
3236

3337
enum class InspectorAction {

src/inspector_socket.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class InspectorSocket {
6363
bool ws_mode;
6464
bool shutting_down;
6565
bool connection_eof;
66+
6667
private:
6768
DISALLOW_COPY_AND_ASSIGN(InspectorSocket);
6869
};

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy