Add a default timeout to iq.send().
This fixes a leak of MatchIDSender in handlers, making it more and more expensive to match stanzas as more iqs have been sent.
This commit is contained in:
@@ -187,6 +187,10 @@ class Iq(RootStanza):
|
||||
|
||||
future = asyncio.Future()
|
||||
|
||||
# Prevents handlers from existing forever.
|
||||
if timeout is None:
|
||||
timeout = 120
|
||||
|
||||
def callback_success(result):
|
||||
type_ = result['type']
|
||||
if type_ == 'result':
|
||||
|
||||
Reference in New Issue
Block a user