From b4b19aaa6e6243f5d9e55a70d6b85c24f7a01cf2 Mon Sep 17 00:00:00 2001 From: qydysky Date: Sat, 9 Dec 2023 14:59:10 +0800 Subject: [PATCH] 1 --- rpc/Rpc.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpc/Rpc.go b/rpc/Rpc.go index c69b10b..00a89ff 100644 --- a/rpc/Rpc.go +++ b/rpc/Rpc.go @@ -2,6 +2,7 @@ package part import ( "bytes" + "context" "encoding/gob" "net/http" "net/rpc" @@ -48,7 +49,7 @@ type Pob struct { c *rpc.Client } -func (t *Pob) Server(deal func(i, o *Gob) error) (shutdown func(), err error) { +func (t *Pob) Server(deal func(i, o *Gob) error) (shutdown func(ctx ...context.Context), err error) { var path web.WebPath webSync := web.NewSyncMap(&http.Server{ Addr: t.Host, -- 2.39.2