add error event capture for socket

Change-Id: I6a91642431c3d4944e86f3f33895c97268ffe9fa