summaryrefslogtreecommitdiff
path: root/plugins/channel/plugin.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/channel/plugin.go')
-rw-r--r--plugins/channel/plugin.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/channel/plugin.go b/plugins/channel/plugin.go
index 9afd1264..362dbc07 100644
--- a/plugins/channel/plugin.go
+++ b/plugins/channel/plugin.go
@@ -28,6 +28,15 @@ func (p *Plugin) Serve() chan error {
}
func (p *Plugin) Stop() error {
+ // read from the channels on stop to prevent blocking
+ go func() {
+ for range p.fromCh {
+ }
+ }()
+ go func() {
+ for range p.toCh {
+ }
+ }()
return nil
}