Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/grumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerrick <actown@users.noreply.github.com>2020-04-12 07:09:35 +0300
committerDerrick <actown@users.noreply.github.com>2020-04-12 07:09:35 +0300
commit0d39f28f6e34a1f380c8d79563be3b9ce0361d79 (patch)
tree18fdf2309fd71358efc8cfc70db82ce4042aab54
parentdf983754639dbe9b689f47584bffabae9f438137 (diff)
Fix infinite loop in log writer.
The log writter would end up calling itself non-stop. This instead tells the logtarget.Write function to call the MultiWriter's Write instead of itself.
-rw-r--r--pkg/logtarget/logtarget.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/logtarget/logtarget.go b/pkg/logtarget/logtarget.go
index 1b69a3b..909d829 100644
--- a/pkg/logtarget/logtarget.go
+++ b/pkg/logtarget/logtarget.go
@@ -66,7 +66,7 @@ func (target *logTarget) Write(out []byte) (int, error) {
target.mu.Lock()
defer target.mu.Unlock()
- return target.Write(out)
+ return target.w.Write(out)
}
// Rotate rotates the current log file, if one is opened.