mirror of
https://github.com/schoebel/mars
synced 2025-01-11 17:19:53 +00:00
net: fix unnecessary socket shutdown on nonblocking connects
This commit is contained in:
parent
843a931cae
commit
5fb9fc03d3
@ -187,6 +187,13 @@ int mars_create_socket(struct mars_socket *msock, struct sockaddr_storage *addr,
|
||||
}
|
||||
} else {
|
||||
status = kernel_connect(sock, sockaddr, sizeof(*sockaddr), 0);
|
||||
/* Treat non-blocking connects as successful.
|
||||
* Any potential errors will show up later during traffic.
|
||||
*/
|
||||
if (status == -EINPROGRESS) {
|
||||
MARS_DBG("#%d connect in progress\n", msock->s_debug_nr);
|
||||
status = 0;
|
||||
}
|
||||
if (status < 0) {
|
||||
MARS_DBG("#%d connect failed, status = %d\n", msock->s_debug_nr, status);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user