Reset error status on the socket

Change-Id: Id9cb5c0ac3d51058b9c1481b30b8bbd53aedd4e9