mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 02:01:31 +00:00
Make this test tolerant of more than one message
It is observing the log system. It is reasonable to believe more than one log event might come through over the course of the test. We only need one, though.
This commit is contained in:
parent
a22426011b
commit
7b02f58da0
@ -53,7 +53,12 @@ class _StreamingLogClientProtocol(WebSocketClientProtocol):
|
||||
self.factory.on_open.callback(self)
|
||||
|
||||
def onMessage(self, payload, isBinary):
|
||||
self.on_message.callback(payload)
|
||||
if self.on_message is None:
|
||||
# Already did our job, ignore it
|
||||
return
|
||||
on_message = self.on_message
|
||||
self.on_message = None
|
||||
on_message.callback(payload)
|
||||
|
||||
def onClose(self, wasClean, code, reason):
|
||||
self.on_close.callback(reason)
|
||||
|
Loading…
x
Reference in New Issue
Block a user