gofinance / ib

Pure Go interface to Interactive Brokers IB API
386 stars 120 forks source link

prevent unnecessary CPU hog in infinite loop #35

Closed k3a closed 5 years ago

k3a commented 5 years ago

Using second return value of receive operator satisfies the select's case when errors channel is closed, making another for loop iteration unnecessarily.

k3a commented 5 years ago

Sorry, unnecessary pull request. I had a version without errors = nil line for some reason.