mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Upgrade logs (#1495)
## Issue Addressed #1483 ## Proposed Changes Upgrades the log to a critical if a listener fails. We are able to listen on many interfaces so a single instance is not critical. We should however gracefully shutdown the client if we have no listeners, although the client can still function solely on outgoing connections. For now a critical is raised and I leave #1494 for more sophisticated handling of this. This also updates discv5 to handle errors of binding to a UDP socket such that lighthouse is now able to handle them.
This commit is contained in:
@@ -43,7 +43,10 @@ pub async fn run(config: BootNodeConfig, log: slog::Logger) {
|
||||
}
|
||||
|
||||
// start the server
|
||||
discv5.start(config.listen_socket);
|
||||
if let Err(e) = discv5.start(config.listen_socket) {
|
||||
slog::crit!(log, "Could not start discv5 server"; "error" => e.to_string());
|
||||
return;
|
||||
}
|
||||
|
||||
// if there are peers in the local routing table, establish a session by running a query
|
||||
if !discv5.table_entries_id().is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user