changed PLUS with OR for poll events
Costa Tsaousis committed
May 29, 2016 at 23:52 UTC
87c1327cf66b740a1ef537862a326d265898cb5e
1 file changed
+4
-4
src/web_client.c
+4
-4
@@ -2134,8 +2134,8 @@ void *web_client_main(void *ptr)
2134
fds[0].events = 0;
2135
fds[0].revents = 0;
2136
2137
- if(w->wait_receive) fds[0].events += POLLIN;
2138
- if(w->wait_send) fds[0].events += POLLOUT;
2137
+ if(w->wait_receive) fds[0].events |= POLLIN;
2138
+ if(w->wait_send) fds[0].events |= POLLOUT;
2139
2140
fds[1].fd = -1;
2141
fds[1].events = 0;
@@ -2149,13 +2149,13 @@ void *web_client_main(void *ptr)
2149
fds[0].fd = w->ifd;
2150
fds[0].events = 0;
2151
fds[0].revents = 0;
2152
- if(w->wait_receive) fds[0].events += POLLIN;
2152
+ if(w->wait_receive) fds[0].events |= POLLIN;
2153
ifd = &fds[0];
2154
2155
fds[1].fd = w->ofd;
2156
fds[1].events = 0;
2157
fds[1].revents = 0;
2158
- if(w->wait_send) fds[1].events += POLLOUT;
2158
+ if(w->wait_send) fds[1].events |= POLLOUT;
2159
ofd = &fds[1];
2160
2161
fdmax = 2;