Make networking more stable in case of socket reset