Sockets were being leaked - the WB_ALIVE flags is cleared in various places, but without calling wb_close_socket. When the connection was finally torn down, wb_close_client would only close the socket when WB_ALIVE was still set. Seems more robust to check socket != WB_INVALID_SOCKET?
Merge pull request #8 from hulkholden/sockets

Fix socket leak