File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 44
55#### Bug fixes
66- Fixed an issue where the ` Live ` client would not raise an exception when reading an incompatible DBN version
7+ - Fixed an issue where sending lots of subscriptions could cause a ` BufferError `
78
89## 0.24.1 - 2023-12-15
910
Original file line number Diff line number Diff line change @@ -283,6 +283,7 @@ def subscribe(
283283 stype_in_valid = validate_enum (stype_in , SType , "stype_in" )
284284 symbols_list = optional_symbols_list_to_list (symbols , stype_in_valid )
285285
286+ subscription_bytes : list [bytes ] = []
286287 for batch in chunk (symbols_list , SYMBOL_LIST_BATCH_SIZE ):
287288 batch_str = "," .join (batch )
288289 message = SubscriptionRequest (
@@ -291,8 +292,9 @@ def subscribe(
291292 symbols = batch_str ,
292293 start = optional_datetime_to_unix_nanoseconds (start ),
293294 )
295+ subscription_bytes .append (bytes (message ))
294296
295- self .transport .write ( bytes ( message ) )
297+ self .transport .writelines ( subscription_bytes )
296298
297299 def start (
298300 self ,
Original file line number Diff line number Diff line change @@ -477,7 +477,7 @@ async def _connect_task(
477477 )
478478
479479 try :
480- await asyncio .wait_for (
480+ session_id = await asyncio .wait_for (
481481 protocol .authenticated ,
482482 timeout = AUTH_TIMEOUT_SECONDS ,
483483 )
@@ -488,6 +488,8 @@ async def _connect_task(
488488 ) from None
489489 except ValueError as exc :
490490 raise BentoError (f"User authentication failed: { exc !s} " ) from None
491+ else :
492+ logger .info ("assigned session id %s" , session_id )
491493
492494 logger .info (
493495 "authentication with remote gateway completed" ,
You can’t perform that action at this time.
0 commit comments