Merge branch 'master' into services
This commit is contained in:
		@ -307,10 +307,14 @@ app.on("ready", async () => {
 | 
				
			|||||||
				);
 | 
									);
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
		}, mainWindow, sphinx)
 | 
							}, mainWindow, sphinx)
 | 
				
			||||||
	}, app.getPath("userData"), () => app.quit())
 | 
						}, app.getPath("userData"), () => { 
 | 
				
			||||||
 | 
							stopped = true
 | 
				
			||||||
 | 
							app.quit() 
 | 
				
			||||||
 | 
						})
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
let stopProtect = false
 | 
					let stopProtect = false
 | 
				
			||||||
 | 
					let stopped = false
 | 
				
			||||||
const stop = () => {
 | 
					const stop = () => {
 | 
				
			||||||
	if(stopProtect)
 | 
						if(stopProtect)
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
@ -355,6 +359,12 @@ app.on('before-quit', () => {
 | 
				
			|||||||
	stop()
 | 
						stop()
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// prevent closing app on kill
 | 
				
			||||||
 | 
					app.on('will-quit', (event) => {
 | 
				
			||||||
 | 
						if(!stopped)
 | 
				
			||||||
 | 
							event.preventDefault()
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var rl = require("readline").createInterface({
 | 
					var rl = require("readline").createInterface({
 | 
				
			||||||
	input: process.stdin,
 | 
						input: process.stdin,
 | 
				
			||||||
	output: process.stdout
 | 
						output: process.stdout
 | 
				
			||||||
@ -367,8 +377,3 @@ rl.on("SIGINT", function () {
 | 
				
			|||||||
process.on("SIGINT", () => {
 | 
					process.on("SIGINT", () => {
 | 
				
			||||||
	stop()
 | 
						stop()
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					 | 
				
			||||||
process.on("exit", () => {
 | 
					 | 
				
			||||||
	if(spider)
 | 
					 | 
				
			||||||
		spider.preventNetworkOnExit = true
 | 
					 | 
				
			||||||
})
 | 
					 | 
				
			||||||
@ -103,4 +103,8 @@ process.on("SIGINT", () => {
 | 
				
			|||||||
	{
 | 
						{
 | 
				
			||||||
		process.exit()
 | 
							process.exit()
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					process.on("SIGTERM", () => {
 | 
				
			||||||
 | 
						process.emit("SIGINT");
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
@ -833,13 +833,10 @@ module.exports = function (send, recive, dataDirectory, version, env)
 | 
				
			|||||||
						}))
 | 
											}))
 | 
				
			||||||
					})
 | 
										})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
					if(!this.preventNetworkOnExit)
 | 
										await Promise.all([
 | 
				
			||||||
					{
 | 
											saveBootstrapPeers('api.myjson.com', '/bins/1e5rmh'),
 | 
				
			||||||
						await Promise.all([
 | 
											saveBootstrapPeers('jsonblob.com', '/api/jsonBlob/013a4415-3533-11e8-8290-a901f3cf34aa')
 | 
				
			||||||
							saveBootstrapPeers('api.myjson.com', '/bins/1e5rmh'),
 | 
										])
 | 
				
			||||||
							saveBootstrapPeers('jsonblob.com', '/api/jsonBlob/013a4415-3533-11e8-8290-a901f3cf34aa')
 | 
					 | 
				
			||||||
						])
 | 
					 | 
				
			||||||
					}
 | 
					 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user