mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
[TIPC]: Connected send now checks socket state when retrying congested send.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Per Liden <per.liden@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3546c7508d
commit
bdd94789d2
1 changed files with 8 additions and 8 deletions
|
@ -565,15 +565,15 @@ static int send_packet(struct kiocb *iocb, struct socket *sock,
|
||||||
return -ERESTARTSYS;
|
return -ERESTARTSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely(sock->state != SS_CONNECTED)) {
|
|
||||||
if (sock->state == SS_DISCONNECTING)
|
|
||||||
res = -EPIPE;
|
|
||||||
else
|
|
||||||
res = -ENOTCONN;
|
|
||||||
goto exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
if (unlikely(sock->state != SS_CONNECTED)) {
|
||||||
|
if (sock->state == SS_DISCONNECTING)
|
||||||
|
res = -EPIPE;
|
||||||
|
else
|
||||||
|
res = -ENOTCONN;
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
res = tipc_send(tsock->p->ref, m->msg_iovlen, m->msg_iov);
|
res = tipc_send(tsock->p->ref, m->msg_iovlen, m->msg_iov);
|
||||||
if (likely(res != -ELINKCONG)) {
|
if (likely(res != -ELINKCONG)) {
|
||||||
exit:
|
exit:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue