From 13481d07f543a0c71ced3caf80e0574061d32586 Mon Sep 17 00:00:00 2001 From: Brian White Date: Sat, 1 Oct 2016 19:02:50 -0400 Subject: [PATCH] inspector: fix minor issues PR-URL: https://github.com/nodejs/node/pull/8890 Reviewed-By: Anna Henningsen Reviewed-By: Aleksey Kozyatinskiy Reviewed-By: Franziska Hinkelmann --- src/inspector_agent.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index 13305168f8..fdc8819286 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -88,7 +88,7 @@ void SendHttpResponse(InspectorSocket* socket, const char* response, const char HEADERS[] = "HTTP/1.0 200 OK\r\n" "Content-Type: application/json; charset=UTF-8\r\n" "Cache-Control: no-cache\r\n" - "Content-Length: %ld\r\n" + "Content-Length: %zu\r\n" "\r\n"; char header[sizeof(HEADERS) + 20]; int header_len = snprintf(header, sizeof(header), HEADERS, len); @@ -670,7 +670,7 @@ void AgentImpl::OnRemoteDataIO(InspectorSocket* socket, uv_sem_post(&start_sem_); } PostIncomingMessage(str); - } else if (read <= 0) { + } else { // EOF if (client_socket_ == socket) { String16 message(TAG_DISCONNECT, sizeof(TAG_DISCONNECT) - 1);