Check errors when iterate the stats maps

Don't ignore the error happened when iterating through the statsMap
before tagging a socket. Also simplify the logic a little bit.

Bug: 126620214
Test: netd_unit_test netd_integration_test
Change-Id: Ib41805028798e39fb3a2b503bc3fbe9be32a6c75
1 file changed