From 2f71f79ac704ed95dad961677b6e602e38641b5d Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Mon, 21 Dec 2020 10:27:10 +0300 Subject: Remove unused contex from interfaces. Update pool allocator. --- plugins/server/plugin.go | 4 ++-- plugins/server/tests/plugin_pipes.go | 2 +- plugins/server/tests/plugin_sockets.go | 2 +- plugins/server/tests/plugin_tcp.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go index 8555fd7e..580c1e10 100644 --- a/plugins/server/plugin.go +++ b/plugins/server/plugin.go @@ -62,7 +62,7 @@ func (server *Plugin) Stop() error { return nil } - return server.factory.Close(context.Background()) + return server.factory.Close() } // CmdFactory provides worker command factory assocated with given context. @@ -105,7 +105,7 @@ func (server *Plugin) NewWorker(ctx context.Context, env server.Env) (worker.Bas return nil, errors.E(op, err) } - w, err := server.factory.SpawnWorkerWithContext(ctx, spawnCmd()) + w, err := server.factory.SpawnWorkerWithTimeout(ctx, spawnCmd()) if err != nil { return nil, errors.E(op, err) } diff --git a/plugins/server/tests/plugin_pipes.go b/plugins/server/tests/plugin_pipes.go index 9d7812a8..f49cf6dc 100644 --- a/plugins/server/tests/plugin_pipes.go +++ b/plugins/server/tests/plugin_pipes.go @@ -99,7 +99,7 @@ func (f *Foo) Serve() chan error { } // should not be errors - err = sw.Stop(context.Background()) + err = sw.Stop() if err != nil { errCh <- err return errCh diff --git a/plugins/server/tests/plugin_sockets.go b/plugins/server/tests/plugin_sockets.go index e5b139d4..ee971e45 100644 --- a/plugins/server/tests/plugin_sockets.go +++ b/plugins/server/tests/plugin_sockets.go @@ -79,7 +79,7 @@ func (f *Foo2) Serve() chan error { } // should not be errors - err = sw.Stop(context.Background()) + err = sw.Stop() if err != nil { errCh <- err return errCh diff --git a/plugins/server/tests/plugin_tcp.go b/plugins/server/tests/plugin_tcp.go index 866116a7..cdf23e21 100644 --- a/plugins/server/tests/plugin_tcp.go +++ b/plugins/server/tests/plugin_tcp.go @@ -79,7 +79,7 @@ func (f *Foo3) Serve() chan error { } // should not be errors - err = sw.Stop(context.Background()) + err = sw.Stop() if err != nil { errCh <- err return errCh -- cgit v1.2.3