- if (verbosity)
- fprintf(stderr, "AFB:notice entering httpd waiting loop\n");
- while (TRUE) {
- if (verbosity)
- fprintf(stderr, "AFB:notice httpd alive [%d]\n", count++);
- poll(&pfd, 1, 15000); /* 15 seconds (as above timeout when starting) */
- MHD_run(session->httpd);
+ upoll = upoll_open(info->listen_fd, httpd);
+ if (upoll == NULL) {
+ MHD_stop_daemon(httpd);
+ fprintf(stderr, "Error: connection to upoll of httpd failed");
+ return 0;