Skip to content

Commit

Permalink
fix(syslog): conn is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
flc1125 committed Nov 16, 2023
1 parent 82ab304 commit 9664998
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions log/syslog/syslog.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,9 @@ func (l *Logger) connect() error {
}

func (l *Logger) Close() error {
if l.conn == nil {
return nil
}

Check warning on line 79 in log/syslog/syslog.go

View check run for this annotation

Codecov / codecov/patch

log/syslog/syslog.go#L78-L79

Added lines #L78 - L79 were not covered by tests

return l.conn.Close()
}

0 comments on commit 9664998

Please sign in to comment.