equal
deleted
inserted
replaced
40 p.listeners.onfail(p.data, p.last_error or p.target_resolver.last_error or "unable to resolve service"); |
40 p.listeners.onfail(p.data, p.last_error or p.target_resolver.last_error or "unable to resolve service"); |
41 end |
41 end |
42 return; |
42 return; |
43 end |
43 end |
44 p:log("debug", "Next target to try is %s:%d", ip, port); |
44 p:log("debug", "Next target to try is %s:%d", ip, port); |
45 local conn, err = server.addclient(ip, port, pending_connection_listeners, p.options.pattern or "*a", p.options.sslctx, conn_type, extra); |
45 local conn, err = server.addclient(ip, port, pending_connection_listeners, p.options.pattern or "*a", |
|
46 extra and extra.sslctx or p.options.sslctx, conn_type, extra); |
46 if not conn then |
47 if not conn then |
47 log("debug", "Connection attempt failed immediately: %s", err); |
48 log("debug", "Connection attempt failed immediately: %s", err); |
48 p.last_error = err or "unknown reason"; |
49 p.last_error = err or "unknown reason"; |
49 return attempt_connection(p); |
50 return attempt_connection(p); |
50 end |
51 end |