woodpecker/server
Fernando Barbosa 00f72ef206
Fix EventStreamSSE Memory Leak
The `Config.Services.Pubsub.Subscribe` is being initialized with the global Gin Context. This causes the publisher object to [hang at line 58](https://github.com/cncd/pubsub/blob/master/pub.go#L58) and the goroutine remains opened indefinetly, which can be a source of memory leak.

Setting it to the locally defined ctx object correctly causes the goroutine to close when the function exits due to the deferred close.

See https://discourse.drone.io/t/memory-leak-on-drone-server/1884 for further information.
2018-03-27 19:19:22 -03:00
..
debug Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
metrics Use specific token for prometheus metrics 2018-03-27 22:22:19 +02:00
swagger Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
web Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
badge.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
build.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
file.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
hook.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
hook_test.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
login.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
registry.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
repo.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
rpc.go Use specific token for prometheus metrics 2018-03-27 22:22:19 +02:00
secret.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
stream.go Fix EventStreamSSE Memory Leak 2018-03-27 19:19:22 -03:00
sync.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
user.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
users.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00
z.go Just fixed format with go fmt ./... 2018-03-21 14:02:17 +01:00