From 42556df17bf075b1fff2992d5b0503cb814219e5 Mon Sep 17 00:00:00 2001 From: Tetsuya Morimoto Date: Sat, 24 Jan 2015 17:41:45 +0900 Subject: [PATCH 1/2] Fxied to call _send_cb() instead of _data_cb() for PingFrame --- hyper/http20/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyper/http20/connection.py b/hyper/http20/connection.py index 0cf0f0bc..9d8e0bac 100644 --- a/hyper/http20/connection.py +++ b/hyper/http20/connection.py @@ -339,7 +339,7 @@ def receive_frame(self, frame): p = PingFrame(0) p.flags.add('ACK') p.opaque_data = frame.opaque_data - self._data_cb(p, True) + self._send_cb(p, True) elif frame.type == SettingsFrame.type: if 'ACK' not in frame.flags: self._update_settings(frame) From 0fa1d6843eb7b34c832837555ba5f1a88ba0554e Mon Sep 17 00:00:00 2001 From: Tetsuya Morimoto Date: Sat, 24 Jan 2015 23:37:37 +0900 Subject: [PATCH 2/2] Fixed test ping functions related to _data_cb typo --- test/test_hyper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_hyper.py b/test/test_hyper.py index e3b37b06..675b63ae 100644 --- a/test/test_hyper.py +++ b/test/test_hyper.py @@ -1273,7 +1273,7 @@ def test_ping_with_ack_ignored(self): def data_cb(frame, tolerate_peer_gone=False): assert False, 'should not be called' - c._data_cb = data_cb + c._send_cb = data_cb c.receive_frame(f) def test_ping_without_ack_gets_reply(self): @@ -1285,7 +1285,7 @@ def test_ping_without_ack_gets_reply(self): def data_cb(frame, tolerate_peer_gone=False): frames.append(frame) - c._data_cb = data_cb + c._send_cb = data_cb c.receive_frame(f) assert len(frames) == 1