Let's assume for a moment that "Finished" means that the other end of the socket is declaring that they're done, and that they'll next close the socket. If you have a code path that takes you back through this routine after the other end has closed the socket, you'll see a broken pipe.