summaryrefslogtreecommitdiffstats
path: root/apps/s_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/s_server.c')
-rw-r--r--apps/s_server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/s_server.c b/apps/s_server.c
index 7271b611ef..08753c30fd 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -2167,10 +2167,10 @@ static int sv_body(int s, int stype, unsigned char *context)
tv.tv_sec = 1;
tv.tv_usec = 0;
i = select(width, (void *)&readfds, NULL, NULL, &tv);
- if ((i < 0) || (!i && !_kbhit()))
- continue;
- if (_kbhit())
+ if (has_stdin_waiting())
read_from_terminal = 1;
+ if ((i < 0) || (!i && !read_from_terminal))
+ continue;
#else
if ((SSL_version(con) == DTLS1_VERSION) &&
DTLSv1_get_timeout(con, &timeout))