Bug 1084614 - Improve error message on bind failure in ssltunnel; r=ted
authorGeoff Brown <gbrown@mozilla.com>
Thu, 26 Feb 2015 14:56:47 -0700
changeset 231097 0f9069a68fa3500cf61b1f293b9b71f4ce22549c
parent 231096 4d4e5f65253ddda80c68565929dd5c48c65c5488
child 231098 507a5971a1c1c2401629c709239766f0750c9ec2
push id28344
push userryanvm@gmail.com
push dateFri, 27 Feb 2015 18:20:08 +0000
treeherdermozilla-central@9dd9d1e5b43c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1084614
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1084614 - Improve error message on bind failure in ssltunnel; r=ted
testing/mochitest/ssltunnel/ssltunnel.cpp
--- a/testing/mochitest/ssltunnel/ssltunnel.cpp
+++ b/testing/mochitest/ssltunnel/ssltunnel.cpp
@@ -956,17 +956,17 @@ void StartServer(void* data)
   PRSocketOptionData socket_option;
   socket_option.option = PR_SockOpt_Reuseaddr;
   socket_option.value.reuse_addr = true;
   PR_SetSocketOption(listen_socket, &socket_option);
 
   PRNetAddr server_addr;
   PR_InitializeNetAddr(PR_IpAddrAny, si->listen_port, &server_addr);
   if (PR_Bind(listen_socket, &server_addr) != PR_SUCCESS) {
-    LOG_ERROR(("failed to bind socket\n"));
+    LOG_ERROR(("failed to bind socket on port %d: error %d\n", si->listen_port, PR_GetError()));
     SignalShutdown();
     return;
   }
 
   if (PR_Listen(listen_socket, 1) != PR_SUCCESS) {
     LOG_ERROR(("failed to listen on socket\n"));
     SignalShutdown();
     return;