diff --git a/net/streampool/stream.go b/net/streampool/stream.go index ad75f24c..2c4c959b 100644 --- a/net/streampool/stream.go +++ b/net/streampool/stream.go @@ -23,7 +23,7 @@ type stream struct { } func (sr *stream) write(msg drpc.Message) (err error) { - return sr.queue.TryAdd(sr.stream.Context(), msg) + return sr.queue.TryAdd(msg) } func (sr *stream) readLoop() error { diff --git a/net/streampool/streampool_test.go b/net/streampool/streampool_test.go index d4a05de3..30575019 100644 --- a/net/streampool/streampool_test.go +++ b/net/streampool/streampool_test.go @@ -2,18 +2,19 @@ package streampool import ( "fmt" + "sort" + "sync" + "sync/atomic" + "testing" + "time" + "github.com/anyproto/any-sync/net/peer" "github.com/anyproto/any-sync/net/rpc/rpctest" "github.com/anyproto/any-sync/net/streampool/testservice" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "golang.org/x/net/context" - "sort" "storj.io/drpc" - "sync" - "sync/atomic" - "testing" - "time" ) var ctx = context.Background()