change the reconnection logic of package manager

Change-Id: I7ca2de5dece3a1ef339b32a03fa76593ed389860