From 08fea5705a1f2b4d1f945858a640ceea61765161 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 16 Nov 2014 17:30:33 +0900 Subject: [PATCH] python: Fix bug that settings timer is started when SETTINGS with ACK is sent --- python/nghttp2.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/nghttp2.pyx b/python/nghttp2.pyx index f9beda3f..001ae43e 100644 --- a/python/nghttp2.pyx +++ b/python/nghttp2.pyx @@ -456,7 +456,7 @@ cdef int server_on_frame_send(cnghttp2.nghttp2_session *session, http2.send_response(handler) elif frame.hd.type == cnghttp2.NGHTTP2_SETTINGS: - if (frame.hd.flags & cnghttp2.NGHTTP2_FLAG_ACK) == 0: + if (frame.hd.flags & cnghttp2.NGHTTP2_FLAG_ACK) != 0: return 0 http2._start_settings_timer() @@ -606,7 +606,7 @@ cdef int client_on_frame_send(cnghttp2.nghttp2_session *session, logging.debug('client_on_frame_send, type:%s, stream_id:%s', frame.hd.type, frame.hd.stream_id) if frame.hd.type == cnghttp2.NGHTTP2_SETTINGS: - if (frame.hd.flags & cnghttp2.NGHTTP2_FLAG_ACK) == 0: + if (frame.hd.flags & cnghttp2.NGHTTP2_FLAG_ACK) != 0: return 0 http2._start_settings_timer()