[freetds] SO_LINGER options and l_linger value

Frediano Ziglio freddyz77 at tin.it
Sun Jul 18 13:36:01 EDT 2004

Il dom, 2004-07-18 alle 00:41, James K. Lowden ha scritto:
> On Fri, 16 Jul 2004 Vlad Lyalikov <vlyalikov at etrade.com> wrote:
> > Pardon my ignorance, but I can not figure why FreeTDS sets socket
> > options to make abnormal TCP connection termination via RST. 
> Thanks for the question.  I'm not well versed in TCP socket programming,
> so I had to do some reading to understand what you're saying.  I found:
> http://www.kmutt.ac.th/knowledge/programming/c/unix_socket/faq/unix-socket-faq-2.html#ss2.7
> AIUI, setting SO_LINGER is a mistake.  We're causing the network layer to
> exit abruptly, not giving the server a chance to see our last ACK.  Other
> parts of the FAQ definitely discourage using SO_LINGER as well as
> SO_KEEPALIVE (which we also use).  It looks to me like we should pull it
> out.  

Yes, I agree. SO_LINGER code removed from CVS. I'm not convinced about
SO_KEEPALIVE. If client have to receive a lot of data and wire got
unplugged it keeps waiting.


More information about the FreeTDS mailing list