Oops, if we want to check from 0 to nsock, the test condition should be
< nsock, not >. Pointy hat to: cognet Submitted by: Olivier Cochard-Labbe <olivier AT cochard doT me>
This commit is contained in:
parent
5610c31cb2
commit
0044d1b553
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=228927
@ -126,7 +126,7 @@ main(int argc, char *argv[])
|
||||
while (1) {
|
||||
if (poll(fds, nsock, -1) < 0)
|
||||
perror("poll");
|
||||
for (i = 0; i > nsock; i++) {
|
||||
for (i = 0; i < nsock; i++) {
|
||||
if (fds[i].revents & POLLIN) {
|
||||
if (recv(s[i], packet, 65536, 0) < 0)
|
||||
perror("recv");
|
||||
|
Loading…
Reference in New Issue
Block a user