Skip to content

Commit

Permalink
[TIPC]: Connected send now checks socket state when retrying congeste…
Browse files Browse the repository at this point in the history
…d 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>
  • Loading branch information
Allan Stephens authored and David S. Miller committed Jun 26, 2006
1 parent 3546c75 commit bdd9478
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions net/tipc/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,15 +565,15 @@ static int send_packet(struct kiocb *iocb, struct socket *sock,
return -ERESTARTSYS;
}

if (unlikely(sock->state != SS_CONNECTED)) {
if (sock->state == SS_DISCONNECTING)
res = -EPIPE;
else
res = -ENOTCONN;
goto exit;
}

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);
if (likely(res != -ELINKCONG)) {
exit:
Expand Down

0 comments on commit bdd9478

Please sign in to comment.