gofinance / ib

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

Avoid infinite loop in the manager #21

Closed haohui closed 8 years ago

haohui commented 8 years ago

In the implementation of the Manager, once the preLoop() function close the channel, the main loop will enter an infinite loop as a closed channel in Go never blocks.

This PR proposes to set the closed channel to nil to avoid the infinite loop.