> So do I understand this correctly: The solution to this would simply be
> to remove duplicates from the list of devices?
> 
> That's easy to fix :)

That should fix the symptoms, but not the problem :-)

It seems (without reading the code, just from observing netspeed's
behaviour) that netspeed currently does something like this to find
the list of interface to possibly monitor (monitor_interfaces):

    monitor_interfaces = []
    for interface in list_of_all_interfaces:
       if is_up(interface):
           for ipv4_addr in addr_list(interface, AF_INET):
               monitor_interfaces.append(interface)

I'd suggest changing that logic into:

    monitor_interfaces = []
    for interface in list_of_all_interfaces:
       if is_up(interface):
           monitor_interfaces.append(interface)

This

  a) makes it independent of the address family
  b) adds the interface at most once to the list
  c) is more simple logic

No drawbacks. :)

Uli


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to