File tree Expand file tree Collapse file tree
BinaryOptionsToolsV2/python/BinaryOptionsToolsV2/pocketoption Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -332,15 +332,8 @@ async def check_win(self, id: str) -> dict:
332332 TimeoutError: If result check times out
333333 """
334334
335- # Set a reasonable timeout to prevent hanging
336- timeout_seconds = 60 # Increased timeout to accommodate longer trade durations
337-
338- try :
339- # Use asyncio.wait_for as additional protection against hanging
340- trade = await asyncio .wait_for (self ._get_trade_result (id ), timeout = timeout_seconds )
341- return trade
342- except asyncio .TimeoutError :
343- raise TimeoutError (f"Timeout waiting for trade result for ID: { id } " )
335+ # Let Rust handle the timeout based on the trade close timestamp.
336+ return await self ._get_trade_result (id )
344337
345338 async def get_deal_end_time (self , trade_id : str ) -> Optional [int ]:
346339 """
You can’t perform that action at this time.
0 commit comments