larsth / go9p

Automatically exported from code.google.com/p/go9p
Other
0 stars 0 forks source link

FidDestroy race on Conn closed #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I terminated a network connection to my 9p server mid-read (i.e. after the 
request, prior to the response) and the code in Conn.recv() called FidDestroy() 
on the fid that was involved in the read!  Very inconvenient.  I didn't even 
get a clunk.

I'm not sure if the solution here is to wait for the ref-cnt to hit 0, or Clunk 
the fid.  I don't think a Clunk will do much good as it will be handled by a 
separate goroutine than the Read, which would require that I implement the 
synchronization that go9p probably should here.

Thoughts?

Original issue reported on code.google.com by dadk...@gmail.com on 17 Nov 2010 at 8:42

GoogleCodeExporter commented 9 years ago
I don't think Clunk is the right solution, will change to to call FidDestroy 
when refcount is 0. Thanks.

Original comment by lion...@gmail.com on 19 Nov 2010 at 3:28

GoogleCodeExporter commented 9 years ago

Original comment by lion...@gmail.com on 23 Dec 2010 at 7:01