Update network state listener.\n Fixing multithreading issues