Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 7978b2a

Browse files
committed
Merge pull request #79 from t2y/development
Fxied to call _send_cb() instead of _data_cb() for PingFrame Thanks to @t2y!
2 parents e530d18 + 0fa1d68 commit 7978b2a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

hyper/http20/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def receive_frame(self, frame):
339339
p = PingFrame(0)
340340
p.flags.add('ACK')
341341
p.opaque_data = frame.opaque_data
342-
self._data_cb(p, True)
342+
self._send_cb(p, True)
343343
elif frame.type == SettingsFrame.type:
344344
if 'ACK' not in frame.flags:
345345
self._update_settings(frame)

test/test_hyper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,7 @@ def test_ping_with_ack_ignored(self):
12731273

12741274
def data_cb(frame, tolerate_peer_gone=False):
12751275
assert False, 'should not be called'
1276-
c._data_cb = data_cb
1276+
c._send_cb = data_cb
12771277
c.receive_frame(f)
12781278

12791279
def test_ping_without_ack_gets_reply(self):
@@ -1285,7 +1285,7 @@ def test_ping_without_ack_gets_reply(self):
12851285

12861286
def data_cb(frame, tolerate_peer_gone=False):
12871287
frames.append(frame)
1288-
c._data_cb = data_cb
1288+
c._send_cb = data_cb
12891289
c.receive_frame(f)
12901290

12911291
assert len(frames) == 1

0 commit comments

Comments
 (0)