summaryrefslogtreecommitdiff
path: root/accel-pppd/cli/telnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/cli/telnet.c')
-rw-r--r--accel-pppd/cli/telnet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/accel-pppd/cli/telnet.c b/accel-pppd/cli/telnet.c
index 5cb75c7a..e9e886df 100644
--- a/accel-pppd/cli/telnet.c
+++ b/accel-pppd/cli/telnet.c
@@ -484,7 +484,7 @@ static int cln_read(struct triton_md_handler_t *h)
}
/*log_debug("cli: read(%i): ", n);
print_buf(cln->recv_buf + cln->recv_pos, n);*/
- for (i = 0; i < n; i++) {
+ for (i = 0; i < n && !cln->disconnect; i++) {
if (telnet_input_char(cln, recv_buf[i]))
break;
}