mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 11:07:40 +08:00
fix nil in multi reader
This commit is contained in:
parent
33590e4b32
commit
4f05838b6c
@ -156,7 +156,7 @@ func (c *QQClient) UploadShortVideo(target message.Source, video, thumb io.ReadS
|
||||
cmd = 89
|
||||
}
|
||||
ext, _ := proto.Marshal(c.buildPttShortVideoProto(target, videoSum, thumbSum, videoLen, thumbLen).PttShortVideoUploadReq)
|
||||
combined := utils.MultiReadSeeker(thumb, video)
|
||||
combined := io.MultiReader(thumb, video)
|
||||
input := highway.Transaction{
|
||||
CommandID: cmd,
|
||||
Body: combined,
|
||||
|
@ -23,7 +23,7 @@ func (r *multiReadSeeker) Read(p []byte) (int, error) {
|
||||
readers := make([]io.Reader, len(r.readers))
|
||||
for i := range r.readers {
|
||||
_, _ = r.readers[i].Seek(0, io.SeekStart)
|
||||
readers = append(readers, r.readers[i])
|
||||
readers[i] = r.readers[i]
|
||||
}
|
||||
r.multiReader = io.MultiReader(readers...)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user