commit 35d58d664a04a6289d9a58a40abca663a5778f24
parent 33cded2928328a4d8c53e6b776947473af316d95
Author: Matsuda Kenji <info@mtkn.jp>
Date: Mon, 25 Dec 2023 12:34:31 +0900
delete fixed bug
Diffstat:
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/req.go b/req.go
@@ -33,9 +33,9 @@ type Req struct {
}
// flush cancels the Req by calling r.cancel.
+// It also delete the request from its pool.
func (r *Req) flush() {
// TODO: need mutex?
- // BUG: cancel() can be nil.
r.Cancel()
r.pool.delete(r.Tag)
}
diff --git a/req_test.go b/req_test.go
@@ -25,7 +25,6 @@ func TestFlush(t *testing.T) {
defer func() { testfs.Fsys.Slow = false }()
conn := testfs.SetupConn()
defer conn.Close()
- conn.S.Chatty()
ctx := context.Background()
_, _, err := conn.C.Version(ctx, lib9p.NOTAG, mSize, "9P2000")
if err != nil {