Skip to content

Commit

Permalink
modify fiber_server2 sample for test.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengshuxin committed Feb 12, 2017
1 parent 09e4b0d commit e008172
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib_fiber/samples/server2/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ static void echo_client(ACL_FIBER *fiber acl_unused, void *ctx)

while (1) {
if (__rw_timeout > 0) {
ret = check_read(*cfd, 1000000);
ret = check_read(*cfd, __rw_timeout * 1000);
if (ret < 0)
break;
if (ret == 0)
if (ret == 0) {
printf("read timeout fd=%d\r\n", *cfd);
continue;
}
}

ret = read(*cfd, buf, sizeof(buf));
Expand Down

0 comments on commit e008172

Please sign in to comment.