Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When logger is disabled, it would trigger a panic: #13

Closed
stevapple opened this issue Aug 24, 2024 · 1 comment
Closed

When logger is disabled, it would trigger a panic: #13

stevapple opened this issue Aug 24, 2024 · 1 comment

Comments

@stevapple
Copy link
Contributor

          It looks like when logger is disabled, it would trigger a panic:
Aug 24 19:29:00 web sshmux-pr12[3869518]: panic: runtime error: invalid memory address or nil pointer dereference
Aug 24 19:29:00 web sshmux-pr12[3869518]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6d1f4f]
Aug 24 19:29:00 web sshmux-pr12[3869518]: goroutine 8 [running]:
Aug 24 19:29:00 web sshmux-pr12[3869518]: log/slog.(*Logger).clone(...)
Aug 24 19:29:00 web sshmux-pr12[3869518]:         log/slog/logger.go:117
Aug 24 19:29:00 web sshmux-pr12[3869518]: log/slog.(*Logger).With(0x0, {0xc000109f40, 0x3, 0x3})
Aug 24 19:29:00 web sshmux-pr12[3869518]:         log/slog/logger.go:131 +0x4f
Aug 24 19:29:00 web sshmux-pr12[3869518]: main.(*Server).handler(0xc00011a2c0, {0x80d198, 0xc000052108})
Aug 24 19:29:00 web sshmux-pr12[3869518]:         github.com/USTC-vlab/sshmux/sshmux.go:155 +0x325
Aug 24 19:29:00 web sshmux-pr12[3869518]: created by main.(*Server).serve in goroutine 7
Aug 24 19:29:00 web sshmux-pr12[3869518]:         github.com/USTC-vlab/sshmux/sshmux.go:136 +0x125

Originally posted by @taoky in #12 (comment)

@stevapple
Copy link
Contributor Author

Solved by #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant