Could non-blocking socket using epoll and openssl possibly cause dead loop?

65 views Asked by At

I want to know if the situation below could cause a dead loop:

  1. An non-blocking TCP connection was established between client and server, and the server is using epoll to receive its readable events

  2. The client sent some data to the server, but they are enough for the underlying OPENSSL's BIO to satisfy the needs of the function to continue the operation, so when server is using SSL_read() on it, it will generate SSL_ERROR_WANT_READ err code

  3. At this point, the client will not continue to transfer any new data, at the server side, EPOLL_IN will always be triggered since there are still some data remains to be read, and the result will always be SSL_ERROR_WANT_READ, causing it to be a possible dead loop

0

There are 0 answers