mirror of
https://github.com/ericonr/sndio.git
synced 2024-02-18 04:45:21 -06:00
handle EINTR returned by connect()
This commit is contained in:
parent
6313d1e2bc
commit
979c909719
@ -353,7 +353,10 @@ aucat_connect_tcp(struct aucat *hdl, char *host, char *unit, int isaudio)
|
||||
DPERROR("socket");
|
||||
continue;
|
||||
}
|
||||
restart:
|
||||
if (connect(s, ai->ai_addr, ai->ai_addrlen) < 0) {
|
||||
if (errno == EINTR)
|
||||
goto restart;
|
||||
DPERROR("connect");
|
||||
close(s);
|
||||
s = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user