Added and establishing listening for peer information gossip.

This commit is contained in:
херетик
2023-06-07 16:36:49 +01:00
parent c0f4fe517c
commit a07a013c00
11 changed files with 156 additions and 125 deletions

View File

@@ -49,8 +49,9 @@ func AddHandler(handler func()) {
// Create the channel and start the main interrupt handler that invokes
// all other callbacks and exits if not already done.
_, loc, line, _ := runtime.Caller(1)
msg := fmt.Sprintf("%s:%d", loc, line)
log.T.Ln("\n"+msg, "added interrupt handler")
loc = strings.Split(loc, indra.PathBase)[1]
msg := fmt.Sprintf("\r%s:%d", loc, line)
log.T.Ln(msg, "added interrupt handler")
if ch == nil {
ch = make(chan os.Signal)
signal.Notify(ch, signals...)