<div dir="ltr"><div><div><div>Hi Andy,</div><div><br></div><div>I'm looking for some insight.  I'm seeing the http client delay it's SSL attempt to connect for some time.  During which I get a "connection refused" entry in my browser debug session.  Log below.  I was expecting the SSL session would connect immediately.</div><div><br></div><div>A.  How does this work</div><div>B.  How do I prevent a refused connection?</div><div><br></div><div><br></div><div>Thanks,</div><div>Joel</div><div><br></div><div>[2017/02/21 09:55:17:5571] INFO: Method: POST request for '/rest/send'</div><div>[2017/02/21 09:55:17:5576] INFO: lws_ensure_user_space: 03236950 protocol 02F05ED8</div><div>/send</div><div>[2017/02/21 09:55:17:5576] INFO: lws_read: read_ok, used 465</div><div>[2017/02/21 09:55:17:5576] NOTICE: lws_server_socket_service: wsi 03236950 read 402</div><div><br></div><div>[2017/02/21 09:55:17:5576] NOTICE: lws_spa_create: Created SPA 032831C0</div><div>[2017/02/21 09:55:17:5576] NOTICE: Send Request:</div><div>[2017/02/21 09:55:17:5576] NOTICE: <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>url: <a href="https://uas-api.inrix.com/.">https://uas-api.inrix.com/.</a>..</div><div>[2017/02/21 09:55:17:5576] NOTICE: <span class="gmail-Apple-tab-span" style="white-space:pre">  </span>method: POST</div><div>[2017/02/21 09:55:17:5576] NOTICE: <span class="gmail-Apple-tab-span" style="white-space:pre">        </span>mimetype: application/json</div><div>[2017/02/21 09:55:17:5576] NOTICE: <span class="gmail-Apple-tab-span" style="white-space:pre">  </span>payload: {...}</div><div>[2017/02/21 09:55:17:5576] NOTICE:  Using SSL</div><div>[2017/02/21 09:55:17:5576] NOTICE:  Selfsigned certs allowed</div><div>[2017/02/21 09:55:17:5581] NOTICE:  Skipping peer cert hostname check</div><div>[2017/02/21 09:55:17:5581] NOTICE: using https mode (non-ws)</div><div>[2017/02/21 09:55:17:5581] NOTICE: POST mode</div><div>[2017/02/21 09:55:17:5581] NOTICE: http client: connecting</div><div>[2017/02/21 09:55:17:5581] INFO: lws_ensure_user_space: 032F3058 protocol 02F05ED8</div><div>[2017/02/21 09:55:17:5581] INFO: lws_header_table_attach: wsi 032F3058: ah 00000000 (tsi 0, count = 2) in</div><div>[2017/02/21 09:55:17:5581] INFO: lws_header_table_attach: wsi 032F3058: ah 011F5478: count 3 (on exit)</div><div>[2017/02/21 09:55:17:5581] NOTICE: lws_client_connect_2: address <a href="http://uas-api.inrix.com">uas-api.inrix.com</a></div><div>[2017/02/21 09:55:17:5891] INFO: lws_client_connect_via_info: created child 032F3058 of parent 03236950</div><div>[2017/02/21 09:55:17:5896] NOTICE: lws_client_connect_via_info sucessful wsi=32f3058</div><div>[2017/02/21 09:55:17:5896] INFO: lws_read: read_ok, used 402</div><div>[2017/02/21 09:55:17:5896] INFO: lws_header_table_attach: wsi 03236C60: ah 00000000 (tsi 0, count = 3) in</div><div>[2017/02/21 09:55:17:5896] INFO: lws_header_table_attach: wsi 03236C60: ah 011F6290: count 4 (on exit)</div><div>[2017/02/21 09:55:17:5896] INFO: No upgrade</div><div>[2017/02/21 09:55:17:5896] INFO: lws_ensure_user_space: 03236C60 protocol 02F05E30</div><div>[2017/02/21 09:55:17:5896] INFO: lws_ensure_user_space: 03236C60 protocol pss 0, user_space=00000000</div><div>[2017/02/21 09:55:17:5896] INFO: Method: GET request for '/ui/apps/system/inrix.system.home/images/music-icon.svg'</div><div>[2017/02/21 09:55:17:5901] ERR: 169.254.225.161 - - [21/Feb/2017:09:55:17 -0800] "GET /ui/apps/system/inrix.system.home/images/music-icon.svg http/1.1" 304 68 Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari[2017/02/21 09:55:17:5901] INFO: lws_http_transaction_completed: wsi 03236C60</div><div>[2017/02/21 09:55:17:5901] INFO: lws_ensure_user_space: 03236C60 protocol 02F05E30</div><div>[2017/02/21 09:55:17:5901] INFO: lws_ensure_user_space: 03236C60 protocol pss 0, user_space=00000000</div><div>[2017/02/21 09:55:17:5901] INFO: lws_http_transaction_completed: wsi->more_rx_waiting=0</div><div>[2017/02/21 09:55:17:5901] INFO: lws_header_table_detach: wsi 03236C60: ah 011F6290 (tsi=0, count = 4)</div><div>[2017/02/21 09:55:17:5901] INFO: lws_header_table_detach: wsi 03236C60: ah 011F6290 (tsi=0, count = 3)</div><div>[2017/02/21 09:55:17:5901] INFO: lws_http_transaction_completed: 03236C60: keep-alive await new transaction</div><div>[2017/02/21 09:55:17:5901] INFO: lws_read: read_ok, used 440</div><div>[2017/02/21 09:55:17:5901] INFO: lws_header_table_attach: wsi 032333C8: ah 00000000 (tsi 0, count = 3) in</div><div>[2017/02/21 09:55:17:5901] INFO: lws_header_table_attach: wsi 032333C8: ah 011F6290: count 4 (on exit)</div><div>[2017/02/21 09:55:17:5901] INFO: No upgrade</div><div>[2017/02/21 09:55:17:5901] INFO: lws_ensure_user_space: 032333C8 protocol 02F05E30</div><div>[2017/02/21 09:55:17:5901] INFO: lws_ensure_user_space: 032333C8 protocol pss 0, user_space=00000000</div><div>[2017/02/21 09:55:17:5901] INFO: Method: POST request for '/prop/get'</div><div>[2017/02/21 09:55:17:5906] INFO: lws_ensure_user_space: 032333C8 protocol 02F05ED8</div><div>/get</div><div>[2017/02/21 09:55:17:5906] NOTICE: lws_spa_create: Created SPA 03282EA8</div><div>[2017/02/21 09:55:17:5906] INFO: lws_read: read_ok, used 519</div><div>[2017/02/21 09:55:17:5906] INFO: lws_header_table_attach: wsi 03236C60: ah 00000000 (tsi 0, count = 4) in</div><div>[2017/02/21 09:55:17:5911] INFO: lws_header_table_attach: wsi 03236C60: ah 011F7EC0: count 5 (on exit)</div><div>[2017/02/21 09:55:17:5911] ERR: 169.254.225.161 - - [21/Feb/2017:09:55:17 -0800] "POST /prop/get http/1.1" 200 175 Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36</div><div>[2017/02/21 09:55:17:5911] INFO: lws_http_transaction_completed: wsi 032333C8</div><div>[2017/02/21 09:55:17:5911] INFO: lws_ensure_user_space: 032333C8 protocol 02F05E30</div><div>[2017/02/21 09:55:17:5911] INFO: lws_ensure_user_space: 032333C8 protocol pss 0, user_space=00000000</div><div>[2017/02/21 09:55:17:5916] INFO: lws_http_transaction_completed: wsi->more_rx_waiting=1</div><div>[2017/02/21 09:55:17:5916] INFO: lws_http_transaction_completed: 032333C8: keep-alive await new transaction</div><div>[2017/02/21 09:55:17:5951] INFO: No upgrade</div><div>[2017/02/21 09:55:17:5956] INFO: lws_ensure_user_space: 032333C8 protocol 02F05E30</div><div>[2017/02/21 09:55:17:5956] INFO: lws_ensure_user_space: 032333C8 protocol pss 0, user_space=00000000</div><div>[2017/02/21 09:55:17:5956] INFO: Method: POST request for '/prop/get'</div><div>[2017/02/21 09:55:17:5956] INFO: lws_ensure_user_space: 032333C8 protocol 02F05ED8</div><div>/get</div><div>[2017/02/21 09:55:17:5956] INFO: lws_read: read_ok, used 463</div><div>[2017/02/21 09:55:17:5956] NOTICE: lws_server_socket_service: wsi 032333C8 read 55</div><div><br></div><div>[2017/02/21 09:55:17:5956] NOTICE: lws_spa_create: Created SPA 03283168</div><div>[2017/02/21 09:55:17:5961] INFO: lws_read: read_ok, used 55</div><div>[2017/02/21 09:55:17:5961] ERR: 169.254.225.161 - - [21/Feb/2017:09:55:17 -0800] "POST /prop/get http/1.1" 200 262 Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36</div><div>[2017/02/21 09:55:17:5961] INFO: lws_http_transaction_completed: wsi 032333C8</div><div>[2017/02/21 09:55:17:5961] INFO: lws_ensure_user_space: 032333C8 protocol 02F05E30</div><div>[2017/02/21 09:55:17:5961] INFO: lws_ensure_user_space: 032333C8 protocol pss 0, user_space=00000000</div><div>[2017/02/21 09:55:17:5961] INFO: lws_http_transaction_completed: wsi->more_rx_waiting=0</div><div>[2017/02/21 09:55:17:5966] INFO: lws_header_table_detach: wsi 032333C8: ah 011F6290 (tsi=0, count = 5)</div><div>[2017/02/21 09:55:17:5966] INFO: lws_header_table_detach: wsi 032333C8: ah 011F6290 (tsi=0, count = 4)</div><div>[2017/02/21 09:55:17:5966] INFO: lws_http_transaction_completed: 032333C8: keep-alive await new transaction</div><div>[2017/02/21 09:55:17:6021] INFO: lws_header_table_attach: wsi 032333C8: ah 00000000 (tsi 0, count = 4) in</div><div>[2017/02/21 09:55:17:6021] INFO: lws_header_table_attach: wsi 032333C8: ah 011F6290: count 5 (on exit)</div><div>[2017/02/21 09:55:17:6021] INFO: No upgrade</div><div>[2017/02/21 09:55:17:6021] INFO: lws_ensure_user_space: 032333C8 protocol 02F05E30</div><div>[2017/02/21 09:55:17:6021] INFO: lws_ensure_user_space: 032333C8 protocol pss 0, user_space=00000000</div><div>[2017/02/21 09:55:17:6021] INFO: Method: POST request for '/prop/get'</div><div>[2017/02/21 09:55:17:6026] INFO: lws_ensure_user_space: 032333C8 protocol 02F05ED8</div><div>/get</div><div>[2017/02/21 09:55:17:6026] NOTICE: lws_spa_create: Created SPA 03283530</div><div>[2017/02/21 09:55:17:6031] INFO: lws_read: read_ok, used 526</div><div>[2017/02/21 09:55:17:6031] ERR: 169.254.225.161 - - [21/Feb/2017:09:55:17 -0800] "POST /prop/get http/1.1" 200 202 Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36</div><div>[2017/02/21 09:55:17:6031] INFO: lws_http_transaction_completed: wsi 032333C8</div><div>[2017/02/21 09:55:17:6031] INFO: lws_ensure_user_space: 032333C8 protocol 02F05E30</div><div>[2017/02/21 09:55:17:6031] INFO: lws_ensure_user_space: 032333C8 protocol pss 0, user_space=00000000</div><div>[2017/02/21 09:55:17:6031] INFO: lws_http_transaction_completed: wsi->more_rx_waiting=1</div><div>[2017/02/21 09:55:17:6031] INFO: lws_http_transaction_completed: 032333C8: keep-alive await new transaction</div><div>[2017/02/21 09:55:17:6076] INFO: No upgrade</div><div>[2017/02/21 09:55:17:6081] INFO: lws_ensure_user_space: 032333C8 protocol 02F05E30</div><div>[2017/02/21 09:55:17:6081] INFO: lws_ensure_user_space: 032333C8 protocol pss 0, user_space=00000000</div><div>[2017/02/21 09:55:17:6081] INFO: Method: POST request for '/prop/set'</div><div>[2017/02/21 09:55:17:6081] INFO: lws_ensure_user_space: 032333C8 protocol 02F05ED8</div><div>/set</div><div>[2017/02/21 09:55:17:6081] INFO: lws_read: read_ok, used 463</div><div>[2017/02/21 09:55:17:6081] NOTICE: lws_server_socket_service: wsi 032333C8 read 84</div><div><br></div><div>[2017/02/21 09:55:17:6081] NOTICE: lws_spa_create: Created SPA 03283690</div><div>[2017/02/21 09:55:17:6086] INFO: lws_read: read_ok, used 84</div><div>[2017/02/21 09:55:17:6086] ERR: 169.254.225.161 - - [21/Feb/2017:09:55:17 -0800] "POST /prop/set http/1.1" 200 136 Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36</div><div>[2017/02/21 09:55:17:6086] INFO: lws_http_transaction_completed: wsi 032333C8</div><div>[2017/02/21 09:55:17:6086] INFO: lws_ensure_user_space: 032333C8 protocol 02F05E30</div><div>[2017/02/21 09:55:17:6086] INFO: lws_ensure_user_space: 032333C8 protocol pss 0, user_space=00000000</div><div>[2017/02/21 09:55:17:6086] INFO: lws_http_transaction_completed: wsi->more_rx_waiting=0</div><div>[2017/02/21 09:55:17:6091] INFO: lws_header_table_detach: wsi 032333C8: ah 011F6290 (tsi=0, count = 5)</div><div>[2017/02/21 09:55:17:6091] INFO: lws_header_table_detach: wsi 032333C8: ah 011F6290 (tsi=0, count = 4)</div><div>[2017/02/21 09:55:17:6091] INFO: lws_http_transaction_completed: 032333C8: keep-alive await new transaction</div><div>[2017/02/21 09:55:17:6091] NOTICE: lws_client_connect_2: address <a href="http://uas-api.inrix.com">uas-api.inrix.com</a></div><div>[2017/02/21 09:55:17:6126] INFO: lws_header_table_attach: wsi 032333C8: ah 00000000 (tsi 0, count = 4) in</div><div>[2017/02/21 09:55:17:6126] INFO: lws_header_table_attach: wsi 032333C8: ah 011F6290: count 5 (on exit)</div><div>[2017/02/21 09:55:17:6131] INFO: No upgrade</div><div>[2017/02/21 09:55:17:6131] INFO: lws_ensure_user_space: 032333C8 protocol 02F05E30</div><div>[2017/02/21 09:55:17:6131] INFO: lws_ensure_user_space: 032333C8 protocol pss 0, user_space=00000000</div><div>[2017/02/21 09:55:17:6131] INFO: Method: POST request for '/prop/set'</div><div>[2017/02/21 09:55:17:6131] INFO: lws_ensure_user_space: 032333C8 protocol 02F05ED8</div><div>/set</div><div>[2017/02/21 09:55:17:6131] NOTICE: lws_spa_create: Created SPA 03283218</div><div>[2017/02/21 09:55:17:6136] INFO: lws_read: read_ok, used 652</div><div>[2017/02/21 09:55:17:6136] ERR: 169.254.225.161 - - [21/Feb/2017:09:55:17 -0800] "POST /prop/set http/1.1" 200 136 Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36</div><div>[2017/02/21 09:55:17:6136] INFO: lws_http_transaction_completed: wsi 032333C8</div><div>[2017/02/21 09:55:17:6136] INFO: lws_ensure_user_space: 032333C8 protocol 02F05E30</div><div>[2017/02/21 09:55:17:6136] INFO: lws_ensure_user_space: 032333C8 protocol pss 0, user_space=00000000</div><div>[2017/02/21 09:55:17:6136] INFO: lws_http_transaction_completed: wsi->more_rx_waiting=1</div><div>[2017/02/21 09:55:17:6136] INFO: lws_http_transaction_completed: 032333C8: keep-alive await new transaction</div><div>[2017/02/21 09:55:17:6201] INFO: No upgrade</div><div>[2017/02/21 09:55:17:6201] INFO: lws_ensure_user_space: 032333C8 protocol 02F05E30</div><div>[2017/02/21 09:55:17:6201] INFO: lws_ensure_user_space: 032333C8 protocol pss 0, user_space=00000000</div><div>[2017/02/21 09:55:17:6201] INFO: Method: POST request for '/prop/set'</div><div>[2017/02/21 09:55:17:6206] INFO: lws_ensure_user_space: 032333C8 protocol 02F05ED8</div><div>/set</div><div>[2017/02/21 09:55:17:6206] INFO: lws_read: read_ok, used 464</div><div>[2017/02/21 09:55:17:6206] NOTICE: lws_server_socket_service: wsi 032333C8 read 110</div><div><br></div><div>[2017/02/21 09:55:17:6206] NOTICE: lws_spa_create: Created SPA 032833D0</div><div>[2017/02/21 09:55:17:6211] INFO: lws_read: read_ok, used 110</div><div>[2017/02/21 09:55:17:6211] ERR: 169.254.225.161 - - [21/Feb/2017:09:55:17 -0800] "POST /prop/set http/1.1" 200 136 Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36</div><div>[2017/02/21 09:55:17:6211] INFO: lws_http_transaction_completed: wsi 032333C8</div><div>[2017/02/21 09:55:17:6211] INFO: lws_ensure_user_space: 032333C8 protocol 02F05E30</div><div>[2017/02/21 09:55:17:6211] INFO: lws_ensure_user_space: 032333C8 protocol pss 0, user_space=00000000</div><div>[2017/02/21 09:55:17:6211] INFO: lws_http_transaction_completed: wsi->more_rx_waiting=0</div><div>[2017/02/21 09:55:17:6211] INFO: lws_header_table_detach: wsi 032333C8: ah 011F6290 (tsi=0, count = 5)</div><div>[2017/02/21 09:55:17:6211] INFO: lws_header_table_detach: wsi 032333C8: ah 011F6290 (tsi=0, count = 4)</div><div>[2017/02/21 09:55:17:6216] INFO: lws_http_transaction_completed: 032333C8: keep-alive await new transaction</div><div>[2017/02/21 09:55:17:6326] NOTICE: lws_ssl_client_connect2: SSL_connect says -1</div><div>[2017/02/21 09:55:17:6326] INFO: SSL_connect WANT_READ... retrying</div><div>[2017/02/21 09:55:17:6341] NOTICE: lws_ssl_client_connect2: SSL_connect says -1</div><div>[2017/02/21 09:55:17:6341] INFO: SSL_connect WANT_READ... retrying</div><div>[2017/02/21 09:55:17:6381] NOTICE: lws_ssl_client_connect2: SSL_connect says -1</div><div>[2017/02/21 09:55:17:6381] INFO: SSL_connect WANT_READ... retrying</div><div>[2017/02/21 09:55:17:6581] NOTICE: lws_ssl_client_connect2: SSL_connect says 1</div><div>[2017/02/21 09:55:17:8831] INFO: lws_ensure_user_space: 032F3058 protocol 02F05ED8</div><div>[2017/02/21 09:55:17:8831] INFO: lws_ensure_user_space: 032F3058 protocol pss 11308, user_space=032F5038</div><div>[2017/02/21 09:55:17:8831] NOTICE: lws_client_interpret_server_handshake: incoming content length 1244</div><div>[2017/02/21 09:55:17:8836] INFO: lws_header_table_detach: wsi 032F3058: ah 011F5478 (tsi=0, count = 4)</div><div>[2017/02/21 09:55:17:8836] INFO: lws_header_table_detach: wsi 032F3058: ah 011F5478 (tsi=0, count = 3)</div><div>[2017/02/21 09:55:17:8836] NOTICE: lws_client_interpret_server_handshake: client connection up</div><div>[2017/02/21 09:55:17:8836] INFO: ssl buffered read</div><div>[2017/02/21 09:55:17:8836] INFO: lws_http_transaction_completed_client: 032F3058: keep-alive await new transaction</div><div>[2017/02/21 09:55:17:8841] INFO: lws_close_free_wsi: real just_kill_connection: 032F3058 (sockfd 604)</div><div>[2017/02/21 09:55:17:8841] INFO: remove_wsi_socket_from_fds: removing same prot wsi 032F3058</div><div>[2017/02/21 09:55:17:8841] INFO: ah det due to close</div><div>[2017/02/21 09:55:17:8841] INFO: lws_header_table_detach: wsi 032F3058: ah 00000000 (tsi=0, count = 3)</div><div>[2017/02/21 09:55:17:8846] INFO: lws_header_table_detach: wsi 032F3058: ah 00000000 (tsi=0, count = 3)</div><div>[2017/02/21 09:55:17:9061] NOTICE: lws_server_socket_service: wsi 03236950 read 465</div><div><br></div><div><br></div><div>[2017/02/21 09:55:17:9061] INFO: lws_read: read_ok, used 0</div><div>[2017/02/21 09:55:17:9066] NOTICE: lws_server_socket_service: wsi 03236950 read 441</div><div><br></div></div></div></div>