continue instead of return -1 in connect