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

Commit cc23e2a

Browse files
committed
Rename _send_cb to _send_outstanding_data in stream object
1 parent cd594d8 commit cc23e2a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

hyper/http20/stream.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(self,
4040
stream_id,
4141
window_manager,
4242
connection,
43-
send_cb,
43+
send_outstanding_data,
4444
recv_cb,
4545
close_cb):
4646
self.stream_id = stream_id
@@ -76,7 +76,7 @@ def __init__(self,
7676
self._conn = connection
7777

7878
# Save off a data callback.
79-
self._send_cb = send_cb
79+
self._send_outstanding_data = send_outstanding_data
8080
self._recv_cb = recv_cb
8181
self._close_cb = close_cb
8282

@@ -96,7 +96,7 @@ def send_headers(self, end_stream=False):
9696
headers = self.get_headers()
9797
with self._conn as conn:
9898
conn.send_headers(self.stream_id, headers, end_stream)
99-
self._send_cb()
99+
self._send_outstanding_data()
100100

101101
if end_stream:
102102
self.local_closed = True
@@ -191,7 +191,7 @@ def receive_data(self, event):
191191
conn.increment_flow_control_window(
192192
increment, stream_id=self.stream_id
193193
)
194-
self._send_cb()
194+
self._send_outstanding_data()
195195

196196
def receive_end_stream(self, event):
197197
"""
@@ -291,7 +291,7 @@ def close(self, error_code=None):
291291
else:
292292
send = True
293293
if send:
294-
self._send_cb(tolerate_peer_gone=True)
294+
self._send_outstanding_data(tolerate_peer_gone=True)
295295
self.remote_closed = True
296296
self.local_closed = True
297297

@@ -333,7 +333,7 @@ def _send_chunk(self, data, final):
333333
conn.send_data(
334334
stream_id=self.stream_id, data=data, end_stream=end_stream
335335
)
336-
self._send_cb()
336+
self._send_outstanding_data()
337337

338338
if end_stream:
339339
self.local_closed = True

0 commit comments

Comments
 (0)