The server's "SSL_write" freezes if invoked while client disconnects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everyone,

I have an OpenSSL client (Windows) and server (Ubuntu). When my client tries to disconnect from the server, but the server happens to call SSL_write during the disconnect process by chance, then SSL_write freezes. I tried to check the socket via select and I tried to make it non-blocking before writing, but nothing worked. The function simply freezes (i.e. no return, even as a non-blocking socket), probably because the socket thinks that it is ready, even though it really isn't. Is there any function out there that can reliably tell me whether or not I can call SSL_write in this scenario?

And if there isn't any way to do this, because I made some noobish mistake nobody who knows the first thing about OpenSSL should make:
What is the proper way of dealing with this scenario?

I simply have a scenario where both client and server can send messages at any time and the client can disconnect at any time. The latter is especially bad if it happens via network problems, because a user-invoked disconnect can be worked-around, e.g. the client tells the server "I'm going to disconnect soon, don't call SSL_write any more" and then it waits until the server is ready for disconnecting.

Kind regards
Alex


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux