We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1b7532 commit 4ea5e3fCopy full SHA for 4ea5e3f
2 files changed
examples/s3.go
@@ -41,13 +41,17 @@ func main() {
41
for v := range s.GetEvents() {
42
fmt.Printf("EVENT: %s %s\n", v.Key, v.TypeString())
43
}
44
+ fmt.Println("exiting events")
45
}()
46
47
go func() {
48
for e := range s.GetErrors() {
49
fmt.Printf("ERROR: %#v\n", e)
50
51
+ fmt.Println("exiting errors")
52
53
- time.Sleep(30*time.Second)
54
+ time.Sleep(10*time.Second)
55
+ s.Close()
56
+ time.Sleep(20*time.Second)
57
s3.go
@@ -110,6 +110,8 @@ func (u *S3Watcher) Start() error {
110
u.sync()
111
112
case <-u.stop:
113
+ close(u.Events)
114
+ close(u.Errors)
115
return
116
117
0 commit comments