Only set SO_LINGER if enabled due to Windows issue.

--HG--
extra : amend_source : 5a1160d2ed7cbeb312d6769f6dfad0ce7621a69e