Open
Description
请确保您已阅读以上注意事项,并勾选下方的确认框。
- 我已经仔细阅读上述教程和 "提问前需知"
- 我已经使用 dev分支版本 测试过,问题依旧存在。
- 我已经在 Issue Tracker 中找过我要提出的问题,没有找到相同问题的ISSUE。
- 我已知晓并同意,此处仅用于汇报程序中存在的问题。若这个 Issue 是关于其他非程序本身问题,则我的 Issue 可能会被无条件自动关闭或/并锁定。(这些问题应当在 Discussion 板块提出。)
go-cqhttp 版本
1.2.0
运行环境
Ubuntu
运行架构
AMD64
连接方式
HTTP
使用协议
0 | Default
重现步骤
期望的结果是什么?
它能正常返回
实际的结果是什么?
简单的复现代码/链接(可选)
No response
日志记录(可选)
2024/02/23 11:04:17 http: panic serving 127.0.0.1:41272: runtime error: index out of range [0] with length 0
goroutine 174 [running]:
net/http.(*conn).serve.func1()
net/http/server.go:1854 +0xbf
panic({0xab3c20, 0xc0000ce4c8})
runtime/panic.go:890 +0x263
github.com/Mrs4s/MiraiGo/client/internal/highway.(*Session).nextAddr(0x9e4833?)
github.com/Mrs4s/MiraiGo@v0.0.0-20230823050531-a8213e127b2b/client/internal/highway/highway.go:227 +0xfd
github.com/Mrs4s/MiraiGo/client/internal/highway.(*Session).selectConn(0x2?)
github.com/Mrs4s/MiraiGo@v0.0.0-20230823050531-a8213e127b2b/client/internal/highway/highway.go:248 +0xe5
github.com/Mrs4s/MiraiGo/client/internal/highway.(*Session).uploadSingle(0xc0002283f0, {0x1b, {0xbf75c0, 0xc0001b7920}, {0xc00053ce00, 0x10, 0x10}, 0x129, {0xc000032d20, 0x68, ...}, ...})
github.com/Mrs4s/MiraiGo@v0.0.0-20230823050531-a8213e127b2b/client/internal/highway/bdh.go:39 +0x68
github.com/Mrs4s/MiraiGo/client/internal/highway.(*Session).Upload(0xc0002283f0, {0x1b, {0xbf75c0, 0xc0001b7920}, {0xc00053ce00, 0x10, 0x10}, 0x129, {0xc000032d20, 0x68, ...}, ...})
github.com/Mrs4s/MiraiGo@v0.0.0-20230823050531-a8213e127b2b/client/internal/highway/bdh.go:117 +0x425
github.com/Mrs4s/MiraiGo/client.(*ForwardMessageBuilder).Main(0xc0002194f8, 0xc000010258)
github.com/Mrs4s/MiraiGo@v0.0.0-20230823050531-a8213e127b2b/client/multimsg.go:316 +0x5b8
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).uploadForwardElement(0xc000322480, {0x5, {0xc00046e82d, 0xc0}, {0x0, 0x0}, 0x0, 0x2d, {0x0, 0x0, ...}}, ...)
github.com/Mrs4s/go-cqhttp/coolq/api.go:962 +0x1e5
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).CQSendGroupForwardMessage(0xc000322480, 0x0?, {0x5, {0xc00046e82d, 0xc0}, {0x0, 0x0}, 0x0, 0x2d, {0x0, ...}})
github.com/Mrs4s/go-cqhttp/coolq/api.go:978 +0x7d
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).call(0xc0000c6520, {0xc00069e126, 0x16}, 0xf93ce0, {0xbf7de0, 0xc0003088a0})
github.com/Mrs4s/go-cqhttp/modules/api/api.go:38 +0x1ac5
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).Call(0xc0000c6520, {0xc00069e126, 0x16}, 0x427145?, {0xbf7de0, 0xc0003088a0})
github.com/Mrs4s/go-cqhttp/modules/api/caller.go:35 +0xc5
github.com/Mrs4s/go-cqhttp/server.(*httpServer).ServeHTTP(0xc0000c6500, {0xbfbdb0, 0xc00068e000}, 0xc0004d2000)
github.com/Mrs4s/go-cqhttp/server/http.go:213 +0x8ba
net/http.serverHandler.ServeHTTP({0xbfa770?}, {0xbfbdb0, 0xc00068e000}, 0xc0004d2000)
net/http/server.go:2936 +0x316
net/http.(*conn).serve(0xc0003ec990, {0xbfc2d0, 0xc0006a74a0})
net/http/server.go:1995 +0x612
created by net/http.(*Server).Serve
net/http/server.go:3089 +0x5ed
补充说明(可选)
No response