add linger as a workaround to close sockets: does not work