Ignore:
Timestamp:
May 31, 2009, 4:23:42 AM (10 years ago)
Author:
rme
Message:

SET-SOCKET-OPTIONS: linger makes sense only for TCP sockets. (ticket:519)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-sockets.lisp

    r12105 r12165  
    608608    (when out-of-band-inline
    609609      (int-setsockopt fd #$SOL_SOCKET #$SO_OOBINLINE 1))
    610     (rlet ((plinger :linger))
     610    (when (eq address-family :internet)
     611      (when (eq type :stream)
     612        (rlet ((plinger :linger))
    611613          (setf (pref plinger :linger.l_onoff) (if linger 1 0)
    612614                (pref plinger :linger.l_linger) (or linger 0))
    613615          (socket-call socket "setsockopt"
    614                        (c_setsockopt fd #$SOL_SOCKET #$SO_LINGER plinger (record-length :linger))))
    615     (when (eq address-family :internet)
     616                       (c_setsockopt fd #$SOL_SOCKET #$SO_LINGER
     617                                     plinger (record-length :linger)))))
    616618      (when nodelay
    617619        (int-setsockopt fd
Note: See TracChangeset for help on using the changeset viewer.