Skip to content

Commit 54b7fb6

Browse files
committed
ref(client): Fix mypy errors
GH-4601
1 parent 1db746a commit 54b7fb6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

sentry_sdk/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@ def flush(
227227

228228

229229
@clientmethod
230-
def flush_async(
230+
async def flush_async(
231231
timeout: Optional[float] = None,
232232
callback: Optional[Callable[[int, float], None]] = None,
233233
) -> None:
234-
return get_client().flush_async(timeout=timeout, callback=callback)
234+
return await get_client().flush_async(timeout=timeout, callback=callback)
235235

236236

237237
def start_span(**kwargs: Any) -> Span:

sentry_sdk/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,9 @@ async def close_async(
982982
return
983983
await self.flush_async(timeout=timeout, callback=callback)
984984
self._close_components()
985-
await self.transport.kill()
985+
kill_task = self.transport.kill() # type: ignore
986+
if kill_task is not None:
987+
await kill_task
986988
self.transport = None
987989

988990
def flush(

0 commit comments

Comments
 (0)