mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-07 20:45:53 +08:00
fix addrs.
This commit is contained in:
parent
d0a296aab7
commit
f1f3e66796
@ -591,19 +591,14 @@ func (c *QQClient) UploadGroupImage(groupCode int64, img io.ReadSeeker) (*messag
|
||||
goto ok
|
||||
}
|
||||
_, _ = img.Seek(0, io.SeekStart)
|
||||
if len(c.srvSsoAddrs) == 0 {
|
||||
for i, addr := range rsp.UploadIp {
|
||||
c.srvSsoAddrs = append(c.srvSsoAddrs, fmt.Sprintf("%v:%v", binary.UInt32ToIPV4Address(uint32(addr)), rsp.UploadPort[i]))
|
||||
}
|
||||
}
|
||||
if _, err = c.highwayUploadByBDH(img, 2, rsp.UploadKey, EmptyBytes); err == nil {
|
||||
goto ok
|
||||
}
|
||||
|
||||
/*
|
||||
for i, ip := range rsp.UploadIp {
|
||||
err := c.highwayUpload(uint32(ip), int(rsp.UploadPort[i]), rsp.UploadKey, img, 2)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
goto ok
|
||||
}
|
||||
*/
|
||||
return nil, errors.New("upload failed")
|
||||
ok:
|
||||
_, _ = img.Seek(0, io.SeekStart)
|
||||
|
Loading…
x
Reference in New Issue
Block a user