[PATCH] rlWaitForSocket - add waiting for socket closure