Skip to content

Commit 6631fbc

Browse files
committed
fix: Add close() to the AsyncFeatureRequester interface
AsyncPollingUpdateProcessor.stop awaits requester.close(), and the requester param is typed against AsyncFeatureRequester, so the interface must declare close() — otherwise a substitute requester implementing only the interface would fail at shutdown.
1 parent b64a464 commit 6631fbc

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

ldclient/interfaces.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,13 @@ async def get_all_data(self) -> Mapping[VersionedDataKind, Mapping[str, dict]]:
590590
"""
591591
...
592592

593+
@abstractmethod
594+
async def close(self) -> None:
595+
"""
596+
Releases any resources (such as an HTTP transport) owned by the requester.
597+
"""
598+
...
599+
593600

594601
class DiagnosticDescription:
595602
"""

0 commit comments

Comments
 (0)