Write queue after connect windows

there is no such thing as UV_INVALID_HANDLE, the last patch though uses what I think you wanted