diff --git a/event/subscription.go b/event/subscription.go index d03f465075..26efbf994b 100644 --- a/event/subscription.go +++ b/event/subscription.go @@ -143,7 +143,7 @@ func (s *resubscribeSub) loop() { } func (s *resubscribeSub) subscribe() Subscription { - subscribed := make(chan error) + subscribed := make(chan error, 1) var sub Subscription retry: for { diff --git a/p2p/simulations/adapters/exec.go b/p2p/simulations/adapters/exec.go index 7c6ec94621..18ec9c69b8 100644 --- a/p2p/simulations/adapters/exec.go +++ b/p2p/simulations/adapters/exec.go @@ -287,7 +287,7 @@ func (n *ExecNode) Stop() error { if err := n.Cmd.Process.Signal(syscall.SIGTERM); err != nil { return n.Cmd.Process.Kill() } - waitErr := make(chan error) + waitErr := make(chan error, 1) go func() { waitErr <- n.Cmd.Wait() }()