Commit 8f7bae7
authored
fix: run credential refresh in thread (#508)
The async connector must sometimes refresh its credentials, but prior to this
commit the refresh operation would block the main thread.
Now that this library supports at minimum Python 3.10, we may use the
asyncio.to_thread method to run the refresh on a separate thread, awaiting its
result before continuing with the connection info refresh operation.
Fixes #2451 parent c5ea645 commit 8f7bae7
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
| 243 | + | |
243 | 244 | | |
244 | | - | |
| 245 | + | |
245 | 246 | | |
246 | 247 | | |
247 | 248 | | |
| |||
0 commit comments