버그 수정 2건 — MDD 계산 오류 + KIS API 타임아웃
1. evening.py MDD: peak=0 초기값 문제로 분모가 1이 되어 수천만% 출력 → 초기자본(10,000,000) 기준 % 계산으로 변경 2. kis_client.py _request: ClientTimeout 미설정으로 SSL 연결이 무한 대기 → total=10초 타임아웃 적용, 세마포 타임아웃 오류 방지 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -181,7 +181,8 @@ class KISClient:
|
||||
await asyncio.sleep(wait)
|
||||
self._req_times.append(time.monotonic())
|
||||
|
||||
async with aiohttp.ClientSession() as session:
|
||||
_timeout = aiohttp.ClientTimeout(total=10)
|
||||
async with aiohttp.ClientSession(timeout=_timeout) as session:
|
||||
if method == "GET":
|
||||
async with session.get(url, headers=headers, params=params) as r:
|
||||
data = await r.json()
|
||||
|
||||
Reference in New Issue
Block a user