aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--kirc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/kirc.c b/kirc.c
index 2dcf6fa..daffee9 100644
--- a/kirc.c
+++ b/kirc.c
@@ -618,19 +618,16 @@ int main(int argc, char **argv) {
fds[1].events = POLLIN;
char usrin[MSG_MAX];
- int byteswaiting = 1;
for (;;) {
int poll_res = poll(fds, 2, -1);
if (poll_res != -1) {
if (fds[0].revents & POLLIN) {
- byteswaiting = 0;
edit(usrin, MSG_MAX);
printf("\n\x1b[0F\x1b[0K");
handleUserInput(usrin);
- byteswaiting = 1;
}
- if (fds[1].revents & POLLIN && byteswaiting) {
+ if (fds[1].revents & POLLIN) {
disableRawMode();
int rc = handleServerMessage();
if (rc != 0) {