Skip to content

Fixed: tns livesync android not updating application consistently #1923

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

Merged
merged 1 commit into from
Jul 14, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions lib/services/livesync/android-livesync-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,14 @@ class AndroidLiveSyncService extends liveSyncServiceBaseLib.LiveSyncServiceBase<

private sendPageReloadMessage(): IFuture<void> {
let future = new Future<void>();

let socket = new net.Socket();
socket.connect(AndroidLiveSyncService.BACKEND_PORT, '127.0.0.1', () => {
try {
socket.write(new Buffer([0, 0, 0, 1, 1]));
future.return();
} catch (e) {
future.throw(e);
} finally {
socket.destroy();
}
socket.write(new Buffer([0, 0, 0, 1, 1]));
});
socket.on("data", (data: any) => {
socket.destroy();
future.return();
});

return future;
}

Expand Down