gh-91048: fix _asyncio.future_discard_from_awaited_by (#129731)

fix discard
This commit is contained in:
Kumar Aditya 2025-02-06 22:05:33 +05:30 committed by GitHub
parent 75c551974f
commit e7bc0cd182
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4155,7 +4155,7 @@ _asyncio_future_discard_from_awaited_by_impl(PyObject *module, PyObject *fut,
if (TaskOrFuture_Check(state, fut) && TaskOrFuture_Check(state, waiter)) {
int res;
Py_BEGIN_CRITICAL_SECTION(fut);
res = future_awaited_by_add(state, (FutureObj *)fut, waiter);
res = future_awaited_by_discard(state, (FutureObj *)fut, waiter);
Py_END_CRITICAL_SECTION();
if (res) {
return NULL;