fix a race condition handling new proxy connections by passing the connection variable into the goroutine instead of closing over it