set options for keepalive and linger, otherwise https client will hang on a broken connection