[BUG]when client send msg to server concurrently. how the server guarantee the response of ask(ctx, msg, mustWaitOnlyTheNextMessage) is matchs the send? #113
Labels
bug
Something isn't working
The ask in conn.go line 941. when server send msg to the client. it start a goroutine and runs c.Socket().ReadData(c.readTimeout) to read the next msg. But how it guarantee the next msg is the response that the ask method send?
On the other hand, when websocket connected, the server runs startReader() that runs c.Socket().ReadData(c.readTimeout) in loop. In multi goroutine that may be run at the same time. Is it safe to read and how to guarantee the ask() method's response is matchs the ask()?
The text was updated successfully, but these errors were encountered: