File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ async def connection_ready(self, ready_timeout=10):
227
227
228
228
await asyncio .wait_for (self ._channel .channel_ready (), timeout = ready_timeout )
229
229
230
- async def close (self , grace : float = None ):
230
+ async def close (self , grace : float = 30 ):
231
231
"""
232
232
Closes the underlying gRPC channel
233
233
:param: grace: If a grace period is specified, this method wait until all active
@@ -239,12 +239,12 @@ async def close(self, grace: float = None):
239
239
240
240
self .closing = True
241
241
242
- if self .calls :
243
- await asyncio .wait (self .calls .values (), timeout = grace )
244
-
245
242
for callback in self ._cleanup_callbacks :
246
243
callback (self )
247
244
245
+ if self .calls :
246
+ await asyncio .wait (self .calls .values (), timeout = grace )
247
+
248
248
await self .destroy ()
249
249
250
250
async def __aenter__ (self ):
You can’t perform that action at this time.
0 commit comments