Commit 70adacd1 authored by Niels Möller's avatar Niels Möller
Browse files

(do_tcpip_eof): Call shutdown(socket, SHUT_WR),

to signal to the local peer that there's no more data.

Rev: src/tcpforward.c:1.57
parent 833f21aa
......@@ -142,11 +142,19 @@ do_tcpip_send_adjust(struct ssh_channel *s,
}
static void
do_tcpip_eof(struct ssh_channel *c)
do_tcpip_eof(struct ssh_channel *s)
{
if ( (c->flags & CHANNEL_SENT_EOF)
&& (c->flags & CHANNEL_CLOSE_AT_EOF))
channel_close(c);
CAST(tcpip_channel, self, s);
/* Tell the local peer that there's no more data.
* 1 is SHUT_WR. */
if (shutdown (self->socket->fd, 1) < 0)
werror("do_tcpip_eof, shutdown() failed, (errno = %i): %z\n",
errno, STRERROR(errno));
if ( (s->flags & CHANNEL_SENT_EOF)
&& (s->flags & CHANNEL_CLOSE_AT_EOF))
channel_close(s);
}
/* NOTE: Adds the socket to the channel's resource list */
......
Supports Markdown
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