INFURA / go-ethlibs

Ethereum libraries in Go for interacting with Ethereum nodes
MIT License
161 stars 34 forks source link

Use Close instead of Deadlines, use DialContext. #21

Closed ryanschneider closed 4 years ago

ryanschneider commented 4 years ago

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.