diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc index 5a71250840b..2460e1bb91f 100644 --- a/proxy/http2/Http2Stream.cc +++ b/proxy/http2/Http2Stream.cc @@ -436,7 +436,7 @@ Http2Stream::initiating_close() bool sent_write_complete = false; if (_sm) { // Push out any last IO events - if (write_vio.cont) { + if (write_vio.cont && write_vio.nbytes > 0) { SCOPED_MUTEX_LOCK(lock, write_vio.mutex, this_ethread()); // Are we done? if (write_vio.nbytes == write_vio.ndone) { diff --git a/tests/gold_tests/h2/h2spec.test.py b/tests/gold_tests/h2/h2spec.test.py index 5c9e3d6da29..1c1f2a6dbb5 100644 --- a/tests/gold_tests/h2/h2spec.test.py +++ b/tests/gold_tests/h2/h2spec.test.py @@ -53,8 +53,8 @@ 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.client.verify.server': 0, - 'proxy.config.diags.debug.enabled': 1, - 'proxy.config.diags.debug.tags': 'http2', + 'proxy.config.diags.debug.enabled': 0, + 'proxy.config.diags.debug.tags': 'http', }) # ---- @@ -65,7 +65,7 @@ h2spec_targets = "http2/1 http2/2 http2/3 http2/4 http2/5 http2/6.1 http2/6.2 http2/6.3 http2/6.5 http2/6.6 http2/6.7 http2/6.8 http2/7 http2/8 hpack" test_run = Test.AddTestRun() -test_run.Processes.Default.Command = 'h2spec {0} -t -k -p {1}'.format(h2spec_targets, ts.Variables.ssl_port) +test_run.Processes.Default.Command = 'h2spec {0} -t -k --timeout 10 -p {1}'.format(h2spec_targets, ts.Variables.ssl_port) test_run.Processes.Default.ReturnCode = 0 test_run.Processes.Default.StartBefore(httpbin, ready=When.PortOpen(httpbin.Variables.Port)) test_run.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port))