File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file.
13
13
14
14
### Bugfixes
15
15
- Fix HTTP request type for ` get_product_source ` method in Configuration API v3.5 and v3.6.
16
+ - Fix an issue related to fetching responses in RTM.
16
17
17
18
## [ 0.3.6] - 2023-03-09
18
19
Original file line number Diff line number Diff line change @@ -81,9 +81,11 @@ def send(self,
81
81
if not self .sock or self .sock .send (request_json , opcode ) == 0 :
82
82
raise WebSocketConnectionClosedException (
83
83
'Connection is already closed.' )
84
- while not (response := next ((item for item in self .messages
85
- if item .get ('request_id' ) == request_id ),
86
- None )) and response_timeout > 0 :
84
+ while not (response := next (
85
+ (item
86
+ for item in self .messages if item .get ('request_id' ) == request_id
87
+ and item .get ('type' ) == 'response' ),
88
+ None )) and response_timeout > 0 :
87
89
sleep (0.2 )
88
90
response_timeout -= 0.2
89
91
self .logger .info (f'\n RESPONSE:\n { json .dumps (response , indent = 4 )} ' )
You can’t perform that action at this time.
0 commit comments