[stunnel-users] read sock return size 0 situation( it cause http web server to wait timeout for long time)

Stanley Stanley_Li at alphanetworks.com
Tue Jan 18 02:43:47 CET 2005

1.In our case, the web server sent TCP fin,ack to stunnel 
but the stunnel just sent TCP ack, so it is TCP half close.
2.The stunnel use read() function that try to read more data from sock_fd 
but return 0(EOF) because TCP half close.
3.At this moment, the stunnel call SSL_shutdown() function 
that sent close_notify alert but a broswer(IE6 or firefox1.0) return no message.

I just modify stunnel 4.07 client.c to set sock_wr=0 
that will close TCP connection from stunnel to web server when read() EOF. 


==== to ====

Then, everything is seems to work good.
Maybe something will be inefficient but good work in our embbeded linux now.

Sincerely, Stanley(志益)
Alpha Networks Inc.
Engineer, Fimware Development Dept. III
TEL:886-3-5636666 EXT:6563
E-mail:Stanley_Li at alphanetworks.com
Addr: No. 8 Li-shing 7th Rd., Science-based 
Industrial Park, Hsinchu, Taiwan, R.O.C.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stunnel.org/pipermail/stunnel-users/attachments/20050118/3224f031/attachment.html>

More information about the stunnel-users mailing list