Skip to content

Commit

Permalink
Merge pull request #37 from euforic/TIMOB-14425
Browse files Browse the repository at this point in the history
[TIMOB-14425] LiveView: iOS simulator is no longer updated once Android emulator is terminated when both are run with LiveView
  • Loading branch information
Christian Sullivan committed Jul 10, 2013
2 parents 5375660 + 9525d61 commit a4e0d6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions lib/fserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ FServer.stop = function (env) {
console.log('[LiveView]'.green, 'Closing file/event server process id: ' + _pid);
process.kill(_pid);
} catch (e) {
//console.error('[LiveView]'.red, 'Error closing server', e);
console.error('[LiveView]'.red, 'Error closing server', e);
}
});

Expand Down Expand Up @@ -212,7 +212,7 @@ FServer.start = function(opts) {

client.on('end', function(e){
console.log('[LiveView]'.green, 'Client disconnected');
evtServer.clients.splice(client);
//evtServer.clients.splice(client);
})

client.on('data', function(e){
Expand Down Expand Up @@ -243,16 +243,17 @@ FServer.start = function(opts) {
});

evtServer.on('change', function(file){
var clients = evtServer.clients;
var clients = evtServer.clients.slice(0);
var clientLen = clients.length;

logFsChange(file, 'Changed');

for (var i = 0; i < clientLen; i++) {
try {
clients[i].write(JSON.stringify({type:'event', name:'reload'}));
evtServer.clients.shift();
} catch(e){
clients.splice(i);
//clients.splice(i);
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "liveview",
"version": "0.1.26",
"version": "0.1.27",
"description": "Titanium Live Realtime App Development",
"main": "index.js",
"private": true,
Expand Down

0 comments on commit a4e0d6d

Please sign in to comment.