s4-client: Check return codes in do_connect().