-
- Downloads
Fix the nasty timing bug w/ Python asyncio.Protocol. The API reports the transport as "connected",
but the IGMP packet wasn't sent yet. So we are receiving answers before we managed to effectly join the multicast group. Here an example (tshark) with is a is_alive query: 1 0.000000000 10.77.3.105 → 224.0.29.200 UDP 120 1236 → 1236 Len=78 <-- notify is_alive 2 0.000033024 10.77.3.105 → 224.0.29.200 UDP 150 1236 → 1236 Len=108 <-- request is_alive 3 0.007238730 10.77.3.105 → 224.0.29.200 IGMPv2 46 MRG 224.0.29.200 <-- Multicast join The average delay is around 8ms on a container based install (with 802.1q, and bridges) The only solution right now is to wait (50ms) in AsycnNetworkConnector.connect(). After the patch, you should experience something like this: 1 0.000000000 10.77.3.105 → 224.0.29.200 IGMPv2 46 MRG 224.0.29.200 2 0.043197464 10.77.3.105 → 224.0.29.200 UDP 120 1236 → 1236 Len=78 3 0.043218241 10.77.3.105 → 224.0.29.200 UDP 150 1236 → 1236 Len=108 4 0.046509230 10.77.3.64 → 224.0.29.200 UDP 122 1236 → 1236 Len=80 5 0.047613517 10.77.3.64 → 224.0.29.200 UDP 122 1236 → 1236 Len=80 6 0.049329272 10.77.3.64 → 224.0.29.200 UDP 123 1236 → 1236 Len=81 Yes, first device answers within 3.3ms.. so < 8ms. This bug only occurs on host with no other xAAL apps running on the same address/port and only at startup. git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@3145 b32b6428-25c9-4566-ad07-03861ab6144f
Please register or sign in to comment