You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After first c.doneCh <-true is send, the select will immediate run default flow. The Receive will get io.EOF again, but at that time, the listenWrite is exit because of c.donCh. The c.doneCh is not buffered, so it will be blocked for ever.
The simple fix is add time.Sleep(xxx) after the c.doneCh <-true. (Any way it is not a good fix.)
The text was updated successfully, but these errors were encountered:
Simple run the demo, it works, but the flow has problem.
func (c *Client) listenRead() the api is never exited, always blocked on the c.doneCh on the second time
After first c.doneCh <-true is send, the select will immediate run default flow. The Receive will get io.EOF again, but at that time, the listenWrite is exit because of c.donCh. The c.doneCh is not buffered, so it will be blocked for ever.
The simple fix is add time.Sleep(xxx) after the c.doneCh <-true. (Any way it is not a good fix.)
The text was updated successfully, but these errors were encountered: