Catch the socket exception and log it.

Closes-Bug: #1186394
Change-Id: I8aefe54deaa44427c6bb92cf439545e94902fb52
Merge "Catch the socket exception and log it."