From 15bdf82b56d0ae470b57fbd8ef618affc358f1c1 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Tue, 5 May 2015 10:04:31 +1000 Subject: [PATCH] Connection.finishOp --- connection.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/connection.go b/connection.go index 8a9da1e..61b3453 100644 --- a/connection.go +++ b/connection.go @@ -86,10 +86,14 @@ func (c *Connection) log( } // Set up state for an op that is about to be returned to the user. -func (c *Connection) beginOp() +func (c *Connection) beginOp() { + c.opsInFlight.Add(1) +} // Clean up all state associated with an op to which the user has responded. -func (c *Connection) finishOp() +func (c *Connection) finishOp() { + c.opsInFlight.Done() +} // Read the next op from the kernel process. Return io.EOF if the kernel has // closed the connection.