novitoll / novitoll_daemon_bot

Telegram @novitoll_daemon_bot source code
GNU General Public License v2.0
13 stars 0 forks source link

Consider "context" pkg for HTTP requests #25

Open novitoll opened 5 years ago

novitoll commented 5 years ago

We (me and imaginary friend) currently create per each HTTP request a goroutine which spawns another group of goroutines called jobs in fan-out pattern, where each job might create several goroutines as well. We haven't noticed the case when HTTP request might be canceled, nor it's died due to TTL. So consider and check if we really need this: https://blog.golang.org/context

novitoll commented 5 years ago

Also limit MAX_ALLOWED size per buffer we create