core: Don't actually start the http server unless we've specified a port or are asking for a port to be determined and written to file.
This commit is contained in:
		@@ -844,6 +844,7 @@ loadSettings()
 | 
				
			|||||||
			httpd.set_http_redirect(settings.http_redirect);
 | 
								httpd.set_http_redirect(settings.http_redirect);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		httpd.all('/app/socket', app.socket);
 | 
							httpd.all('/app/socket', app.socket);
 | 
				
			||||||
 | 
							if (tildefriends.http_port > 0 || tildefriends.args.out_http_port_file) {
 | 
				
			||||||
			let port = httpd.start(tildefriends.http_port);
 | 
								let port = httpd.start(tildefriends.http_port);
 | 
				
			||||||
			if (tildefriends.args.out_http_port_file) {
 | 
								if (tildefriends.args.out_http_port_file) {
 | 
				
			||||||
				print('Writing the port file.');
 | 
									print('Writing the port file.');
 | 
				
			||||||
@@ -862,6 +863,7 @@ loadSettings()
 | 
				
			|||||||
						print('Failed to write the port file.');
 | 
											print('Failed to write the port file.');
 | 
				
			||||||
					});
 | 
										});
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (tildefriends.https_port) {
 | 
							if (tildefriends.https_port) {
 | 
				
			||||||
			async function start_tls() {
 | 
								async function start_tls() {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user