added support for setting SO_LINGER