aboutsummaryrefslogtreecommitdiff
path: root/tests/nt.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/nt.c')
-rw-r--r--tests/nt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/nt.c b/tests/nt.c
index d30e447..98a4077 100644
--- a/tests/nt.c
+++ b/tests/nt.c
@@ -1,7 +1,7 @@
-/* This file is part of GNU Pies.
+/* This file is part of GNU Pies testsuite.
Copyright (C) 2019 Sergey Poznyakoff
GNU Pies is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
@@ -269,21 +269,21 @@ netcat (char const *urlstr)
events = (srv->pollfd->events|POLLHUP)
& (srv->pollfd->revents
& (srv->state | ((srv->state & POLLOUT) ? POLLHUP : 0)));
if (events)
{
+ if (events & POLLIN)
+ netcat_stream_read (srv);
+ if (events & POLLOUT)
+ netcat_stream_write (srv);
if (events & POLLHUP)
{
//grecs_error (NULL, 0, "HUP on %s", srv->id);
netcat_stream_disconnect (srv, srv->state);
}
- else if (events & POLLIN)
- netcat_stream_read (srv);
- else if (events & POLLOUT)
- netcat_stream_write (srv);
}
if (srv->state == 0 || srv->pollfd->fd == -1)
netcat_server_remove (srv);
srv = next;
}
}

Return to:

Send suggestions and report system problems to the System administrator.