Commit bdd94789 authored by Allan Stephens's avatar Allan Stephens Committed by David S. Miller

[TIPC]: Connected send now checks socket state when retrying congested send.

Signed-off-by: default avatarAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: default avatarPer Liden <per.liden@ericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3546c750
...@@ -565,15 +565,15 @@ static int send_packet(struct kiocb *iocb, struct socket *sock, ...@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment