Skip to Content.
Sympa Menu

freetds - [freetds] SO_LINGER options and l_linger value

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Vlad Lyalikov <vlyalikov AT etrade.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] SO_LINGER options and l_linger value
  • Date: Fri, 16 Jul 2004 18:45:11 -0400

Pardon my ignorance, but I can not figure why FreeTDS sets socket options to
make abnormal TCP connection termination via RST.

from ./src/tds/login.c
"$Id: login.c,v 1.124 2004/06/01 05:49:02 jklowden Exp $";

294 }
295 #ifdef SO_LINGER
296 linger_opt.l_onoff = 1;
297 linger_opt.l_linger = 0;
298 setsockopt(tds->s, SOL_SOCKET, SO_LINGER, (char *) &linger_opt,
sizeof(linger_opt));
299 #endif
300


the change apparently happened on:
version 1.97, Tue May 13 09:44:58 2003 UTC

In particular, RST-driven connection termination generates error messages on
Sybase server side.
Sybase complaints on "client disconnetcs ... blah-blah-blah".
Or DBA suggests that "client disconnects" errors sometimes lead to "timeslice
error" + stack trace on Sybase.
I checked native OCS 12.0. OCS_12.0 on Solaris does terminate with TIME_WAIT
states OK.


Vlad,



--
|/~\ The ASCII vlyalikov AT etrade.com
|\ / Ribbon Campaign 226c 6f6f 6b20 696e 746f 2074 6865 2073
| X Against HTML 6f75 7263 652c 206c 756b 6522 2028 4f62
|/ \ Email! 6920 5761 6e29 0a00
6:21PM up 84 days, 6:01, 3 users, load averages: 0.11, 0.10, 0.08



Archive powered by MHonArc 2.6.24.

Top of Page