Made child processes exit automatically
This commit is contained in:
parent
56f653765c
commit
45d7fd78d2
7
proxy.js
7
proxy.js
|
@ -45,3 +45,10 @@ process.on('message', function(data)
|
|||
proxy.write(Buffer(data));
|
||||
}
|
||||
});
|
||||
|
||||
// Has the parent been killed
|
||||
process.on('disconnect', function()
|
||||
{
|
||||
// Exit
|
||||
process.exit();
|
||||
});
|
||||
|
|
7
rsa.js
7
rsa.js
|
@ -109,3 +109,10 @@ process.on('message', function(message)
|
|||
process.exit();
|
||||
}*/
|
||||
});
|
||||
|
||||
// Has the parent been killed
|
||||
process.on('disconnect', function()
|
||||
{
|
||||
// Exit
|
||||
process.exit();
|
||||
});
|
||||
|
|
|
@ -499,6 +499,19 @@ function connect(profile, connection_id)
|
|||
g.users = data.users;
|
||||
g.chats = data.chats;
|
||||
|
||||
// Remove the disabled class
|
||||
$("#profile_button_"+connection_id).removeClass("disabled");
|
||||
|
||||
// Set onclick
|
||||
$("#profile_button_"+connection_id).on("click", function()
|
||||
{
|
||||
// Switch to the profile id
|
||||
profile_switch_to(connection_id);
|
||||
});
|
||||
|
||||
// Set the href
|
||||
document.getElementById("profile_button_"+connection_id).href = "#";
|
||||
|
||||
// Switch to this chat
|
||||
profile_switch_to(connection_id);
|
||||
}
|
||||
|
|
|
@ -361,8 +361,7 @@ function profiles_reload()
|
|||
var profile = document.createElement("li");
|
||||
|
||||
// Set the html for the list item
|
||||
profile.innerHTML = "<a href='#' onclick='profile_switch_to("+
|
||||
i+")'>"+title(i)+"</a>";
|
||||
profile.innerHTML = "<a class='disabled' id='profile_button_"+i+"'>"+title(i)+"</a>";
|
||||
|
||||
// Add the profile to the menu
|
||||
chat_menu.appendChild(profile);
|
||||
|
|
Loading…
Reference in New Issue