fix(pkg/aria2): use pointer receivers for Call methods (#1706)

This commit is contained in:
ShenLin
2025-11-25 13:25:42 +08:00
committed by GitHub
parent 7189c5b461
commit 62dedb2a2e

View File

@@ -117,7 +117,7 @@ func (h *httpCaller) setNotifier(ctx context.Context, u url.URL, notifier Notifi
return
}
func (h httpCaller) Call(method string, params, reply interface{}) (err error) {
func (h *httpCaller) Call(method string, params, reply interface{}) (err error) {
payload, err := EncodeClientRequest(method, params)
if err != nil {
return
@@ -233,7 +233,7 @@ func (w *websocketCaller) Close() (err error) {
return
}
func (w websocketCaller) Call(method string, params, reply interface{}) (err error) {
func (w *websocketCaller) Call(method string, params, reply interface{}) (err error) {
ctx, cancel := context.WithTimeout(context.Background(), w.timeout)
defer cancel()
select {