Skip to content

Commit

Permalink
Remove nil check.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbruens committed Sep 23, 2024
1 parent 030b557 commit 22b6f97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion service/tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func remoteIP(conn net.Conn) netip.Addr {
func debugTCP(l *slog.Logger, template string, cipherID string, attr slog.Attr) {
// This is an optimization to reduce unnecessary allocations due to an interaction
// between Go's inlining/escape analysis and varargs functions like slog.Debug.
if l != nil && l.Enabled(nil, slog.LevelDebug) {
if l.Enabled(nil, slog.LevelDebug) {
l.LogAttrs(nil, slog.LevelDebug, fmt.Sprintf("TCP: %s", template), slog.String("ID", cipherID), attr)
}
}
Expand Down

0 comments on commit 22b6f97

Please sign in to comment.