I'm programing a TCP/IP Socketserver.
My problem is, that my accept call is blocking and not accepting any new incomming connections when I (for example) telnet my server and do not send any data.
When I'm sending anything or quit the telnet accept stops blocking, I can handle the sent data and accept starts to accepting new incomming connections.
main() {
socket = bind_listen();
while(1) {
user_socket = accept(socket);
ssl = SSL_new(ctx);
SSL_set_fd(ssl, user_socket);
SSL_accept(ssl);
event.data.fd = user_socket;
event.events = EPOLLIN | EPOLLONESHOT;
epoll_proof = epoll_ctl(poll_fd, EPOLL_CTL_ADD, user_socket, &event);
}
}
There are several threads which epoll_wait() and handle data. Any idea? Thanks!