-
Notifications
You must be signed in to change notification settings - Fork 506
Open
Labels
Description
Hi, I'm new to Go and have written a very simple program to watch some logs (which rotate). However although the program runs fine for some time, eventually it deadlocks with the following message:
fatal error: all goroutines are asleep - deadlock!
The code I'm using looks like this:
t, err := tail.TailFile("path/to/some/log", tail.Config{
Follow: true,
ReOpen: true})
if err != nil {
log.Fatal(err)
}
for line := range t.Lines {
// Some action based on a log line
}
I can provide a stacktrace if necessary
BTW: I'm on Windows.