lionkov / go9p

Package for implementing clients and servers of the 9P and 9P2000 distributed resource protocols in Go.
Other
20 stars 7 forks source link

Remove data race caused by concurrent access to r.next / r.prev. #39

Closed amscanne closed 9 years ago

amscanne commented 9 years ago

Accessing r.next in the loop on line 273 is racy. As you've already notified r.Done, ReqFree() will be called shortly to free the request and set r.next to nil.

This commit moves list manipulation to the recv() function only.