Merge pull request #755 from hawkowl/event-retention

Bugfix: Pass whether it is retained to the subscribe handler
This commit is contained in:
Tobias Oberstein 2016-11-15 15:21:05 +01:00 committed by GitHub
commit 57c2f87d77
3 changed files with 3 additions and 1 deletions

View File

@ -205,6 +205,7 @@ class RawSocketProtocol(PrefixProtocol):
if data:
PrefixProtocol.data_received(self, data)
ERR_SERIALIZER_UNSUPPORTED = 1
ERRMAP = {

View File

@ -215,6 +215,7 @@ class Test(TestCase):
self.assertTrue(server.onMessage.called)
self.assertTrue(isinstance(server.onMessage.call_args[0][0], message.Abort))
if __name__ == "__main__":
# import sys;sys.argv = ['', 'Test.test_prefix']
main()

View File

@ -587,7 +587,7 @@ class ApplicationSession(BaseSession):
invoke_kwargs = msg.kwargs if msg.kwargs else dict()
if handler.details_arg:
invoke_kwargs[handler.details_arg] = types.EventDetails(publication=msg.publication, publisher=msg.publisher, publisher_authid=msg.publisher_authid, publisher_authrole=msg.publisher_authrole, topic=topic, enc_algo=msg.enc_algo)
invoke_kwargs[handler.details_arg] = types.EventDetails(publication=msg.publication, publisher=msg.publisher, publisher_authid=msg.publisher_authid, publisher_authrole=msg.publisher_authrole, topic=topic, retained=msg.retained, enc_algo=msg.enc_algo)
def _error(e):
errmsg = 'While firing {0} subscribed under {1}.'.format(