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

fix(recovery):panic serving interface conversion #644

Merged
merged 1 commit into from
Jun 12, 2024
Merged

fix(recovery):panic serving interface conversion #644

merged 1 commit into from
Jun 12, 2024

Conversation

user1121114685
Copy link
Contributor

2024/06/12 22:27:36 http: panic serving [::1]:3062: interface conversion: interface {} is nil, not *zap.Logger goroutine 77 [running]: net/http.(*conn).serve.func1() net/http/server.go:1868 +0xb9 panic({0x20f3be0?, 0xc0005286f0?}) runtime/panic.go:920 +0x270 github.com/iyear/tdl/pkg/logger.From(...) github.com/iyear/tdl/pkg/logger/logger.go:14 github.com/iyear/tdl/pkg/recovery.(*recovery).Handle.func1({0x2695ce8, 0xc00004a9c0}, {0x26897c0?, 0xc0005286c0}, {0x26897e0?, 0xc000476680}) github.com/iyear/tdl/pkg/recovery/recovery.go:32 +0x189 github.com/gotd/td/telegram.InvokeFunc.Invoke(0x30?, {0x2695ce8?, 0xc00004a9c0?}, {0x26897c0?, 0xc0005286c0?}, {0x26897e0?, 0xc000476680?}) github.com/gotd/td@v0.102.0/telegram/middleware.go:15 +0x47 github.com/gotd/td/tg.(*Client).UploadGetFile(0xc000476380, {0x2695ce8, 0xc00004a9c0}, 0x34063ac?) github.com/gotd/td@v0.102.0/tg/tl_upload_get_file_gen.go:341 +0x70 github.com/gotd/contrib/tg_io.chunkSource.Chunk({{0x26a6558?, 0xc0000bf380?}, 0xc000476380?, 0x0?}, {0x2695ce8, 0xc00004a9c0}, 0x0, {0xc0006e2000, 0x80000, 0x80000}) github.com/gotd/contrib@v0.20.0/tg_io/download.go:51 +0xd2 github.com/gotd/contrib/partio.Streamer.safeRead({0x2695ce8?, {0x2688740?, 0xc00025a340?}}, {0x2695ce8?, 0xc00004a9c0?}, 0xc19289f61a265e98?, {0xc0006e2000?, 0x80000, 0x1a53dcd59?}) github.com/gotd/contrib@v0.20.0/partio/streamer.go:37 +0x54

当运行 .\tdl.exe dl -u https://t.me/xxxx/xxxx --serve 的时候访问链接出现崩溃。此pr 可以修复这个崩溃

fix http: panic serving : interface conversion: interface {} is nil, not *zap.Logger
Copy link
Owner

@iyear iyear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iyear iyear merged commit b4d8c32 into iyear:master Jun 12, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants