mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-16 19:51:41 +00:00
logtail: don't pass in nil contexts.
Signed-off-by: David Anderson <dave@natulte.net>
This commit is contained in:
parent
250dfc9016
commit
be6bcd59cd
@ -143,9 +143,6 @@ type logger struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (l *logger) Shutdown(ctx context.Context) error {
|
func (l *logger) Shutdown(ctx context.Context) error {
|
||||||
if ctx == nil {
|
|
||||||
ctx = context.Background()
|
|
||||||
}
|
|
||||||
done := make(chan struct{})
|
done := make(chan struct{})
|
||||||
go func() {
|
go func() {
|
||||||
select {
|
select {
|
||||||
@ -168,7 +165,7 @@ func (l *logger) Shutdown(ctx context.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (l *logger) Close() {
|
func (l *logger) Close() {
|
||||||
l.Shutdown(nil)
|
l.Shutdown(context.Background())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *logger) drainPending() (res []byte) {
|
func (l *logger) drainPending() (res []byte) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user