mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2026-03-13 11:20:33 +00:00
fix(pkg/aria2): use pointer receivers for Call methods (#1706)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user