Allow TCP addresses to be re-resolved whenever there is a reconnection attempt

This commit is contained in:
Mark Barbisan
2014-03-12 12:53:13 -04:00
parent 52db50f844
commit 350a1ac12b
8 changed files with 37 additions and 25 deletions

View File

@@ -30,15 +30,15 @@ int main (void)
int rc = zmq_connect (sock, "tcp://localhost:1234");
assert (rc == 0);
// Because of lazy resolution of TCP names, this will succeed
rc = zmq_connect (sock, "tcp://localhost:invalid");
assert (rc == -1);
assert (errno == EINVAL);
assert (rc == 0);
// Because of lazy resolution of TCP names, this will succeed
rc = zmq_connect (sock, "tcp://in val id:1234");
assert (rc == -1);
assert (errno == EINVAL);
assert (rc == 0);
rc = zmq_connect (sock, "invalid://localhost:1234");
assert (rc == -1);
assert (errno == EPROTONOSUPPORT);