I found after some more testing the gorilla can deadlock with the changes from #18. Luckily, I found that the gorilla docs mention that .Close()is safe to call concurrently from other goroutines, so this seems like a cleaner approach.
While debugging I also changed to using .DialContext since we have a context, and removed some spammy log messages.
I found after some more testing the gorilla can deadlock with the changes from #18. Luckily, I found that the gorilla docs mention that
.Close()
is safe to call concurrently from other goroutines, so this seems like a cleaner approach.While debugging I also changed to using
.DialContext
since we have a context, and removed some spammy log messages.