At least in UML it could sometimes happen that the RoC is ready only
slightly after the NAN frame is TXed (a few microseconds). Insert
a short sleep to prevent this race from happening.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
'srv_proto_type': 3,
'ssi': dbus.ByteArray(b'test')})
+ # Setting up the RoC takes a little bit of time. Avoid racing with
+ # the TX here by sleeping a little bit.
+ time.sleep(0.01)
cmd = "NAN_PUBLISH service_name=_test srv_proto_type=3 ssi=6677 ttl=10"
self.id1 = dev[1].request(cmd)
if "FAIL" in self.id1:
if "FAIL" in id1:
raise Exception("NAN_SUBSCRIBE failed")
+ # Setting up the RoC takes a little bit of time. Avoid racing with
+ # the TX here by sleeping a little bit.
+ time.sleep(0.01)
self.publish_id = iface.NANPublish({'srv_name': '_test',
'srv_proto_type': 2,
'ssi': dbus.ByteArray(b'test')})