fix: snapshot command store

This commit is contained in:
Swann 2019-07-23 11:49:38 +02:00
parent eec0d899dc
commit 4f51941b36
2 changed files with 10 additions and 3 deletions

View File

@ -164,8 +164,8 @@ class ClientNetService(threading.Thread):
if 'SNAPSHOT_END' in datablock.buffer:
self.state = STATE_ACTIVE
logger.debug('{} : snapshot done'.format(self._id))
datablock.store(self._store_reference)
else:
datablock.store(self._store_reference)
# We receive updates from the server !
if self.subscriber in items:

View File

@ -183,13 +183,20 @@ class TestClient(unittest.TestCase):
test_map_result = SampleData()
#Waiting for server to receive the datas
time.sleep(1)
time.sleep(.1)
client2._rep_store[data_sample_key].load(target=test_map_result)
client.unregister(data_sample_key)
time.sleep(.1)
logger.debug("client store:")
logger.debug(client._rep_store)
logger.debug("client2 store:")
logger.debug(client2._rep_store)
logger.debug("server store:")
logger.debug(server._rep_store)
client.disconnect()
client2.disconnect()
server.stop()