Update riack_sock.c

Fixed issue with socket not connecting properly in certain scenarios.
Merge pull request #21 from guilhermeblanco/patch-1

Update riack_sock.c