Error logging and WSAEWOULDBLOCK workaround.