Move portDB attrs to loop() local vars.

Sure, sounds good. Be sure to deep-copy the map, i.e. allocate a new map and copy each k/v into it, to avoid data races.