Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ios): disable log server when not being used #10886

Merged
merged 1 commit into from May 14, 2019

Conversation

sgtcoolguy
Copy link
Contributor

JIRA: https://jira.appcelerator.org/browse/TIMOB-26967

Optional Description:
Backport/cherry-pick of #10869

Previously we'd use DISABLE_TI_LOG_SERVER pre-processor define to turn it off.
Now that TiLogServer is in TitaniumKit we need to use that define to toggle a TiSharedConfig boolean flag.
When off, avoid starting TiLogServer or forwarding logs to it.

Fixes TIMOB-26967
@sgtcoolguy sgtcoolguy added this to the 8.0.1 milestone May 13, 2019
@build build requested a review from a team May 13, 2019 18:08
@build
Copy link
Contributor

build commented May 13, 2019

Fails
🚫

🔬 There are library changes, but no changes to the unit tests. That's OK as long as you're refactoring existing code, but will require an admin to merge this PR. Please see README.md#unit-tests for docs on unit testing.

Messages
📖 👍 Hey!, You deleted more code than you added. That's awesome!
📖

💾 Here's the generated SDK zipfile.

📖

✅ All tests are passing
Nice one! All 3025 tests are passing.

Generated by 🚫 dangerJS against be72343

@ssjsamir ssjsamir self-requested a review May 14, 2019 11:54
Copy link
Contributor

@ssjsamir ssjsamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR Passed: Memory leak seems to be contained using the following test case.

var win = Ti.UI.createWindow({
	backgroundColor: '#fff'
});
 
var btn = Ti.UI.createButton({
	title: 'Trigger'
});
var count = 0;
btn.addEventListener('click', function () {
	var url = 'https://www.mediawiki.org/w/api.php?action=help&recursivesubmodules=1';
	var xhr = Ti.Network.createHTTPClient({
		onload: function (e) {
			Ti.API.debug(this.responseText);
			// alert('success');
			console.log('Success');
			count++;
			// $.num.text = count + ' calls';
		},
		onerror: function (e) {
			Ti.API.debug(e.error);
			console.log('error');
			// alert('error');
		},
		timeout: 5000
	});
	xhr.open('GET', url);
	xhr.send();   
});
 
win.add(btn);
win.open();

Test Environment

iPhone 6S plus (12.2 Sim)
APPC CLI: 7.0.11-1
Operating System Name: Mac OS Mojave
Operating System Version: 10.14.2
Node.js Version: 8.9.1
Xcode 10.2.1

@sgtcoolguy sgtcoolguy merged commit 16150e0 into tidev:8_0_X May 14, 2019
@sgtcoolguy sgtcoolguy deleted the TIMOB-26967-8_0_X branch May 14, 2019 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants