Skip to content

Commit 6b54967

Browse files
committed
FIX: Make the Live client more gracefully close
1 parent 35bcd2e commit 6b54967

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#### Bug fixes
99
- Fixed issue where a large unreadable symbol subscription message could be sent
10+
- Fixed issue where calling `Live.stop` could cause a truncated DBN record to be written to a stream
1011

1112
## 0.24.0 - 2023-11-23
1213

databento/live/session.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,8 @@ def close(self) -> None:
328328
return
329329
if self._transport.can_write_eof():
330330
self._loop.call_soon_threadsafe(self._transport.write_eof)
331-
self._loop.call_soon_threadsafe(self._transport.close)
331+
else:
332+
self._loop.call_soon_threadsafe(self._transport.close)
332333

333334
def subscribe(
334335
self,

0 commit comments

Comments
 (0)