On 4 Aug 2014, at 10:59, Sergei Golovin <[email protected]> wrote: > > Hi! > > I'm trying to develop more thourough NSURLConnection's tests using a > WebServer instance. > And I have the problem with retain/release cycles on the WebServer. > The simple code which gives me the exception > > "Uncaught exception NSFileHandleOperationException, reason: attempt to close > closed file" > > is attached. If i comment out the line > > DESTROY(server); > > at the end it begins to work. But it seems counterintuitive for me. > What do i do wrong?
You are doing nothing wrong. I think that's a bug in shutting down the web server ... the connections the server has open are told to shut down, but if they are operating in the same thread that's shutting down the server, the runloop wasn't being run to allow the I/O to complete. I have added some code to run the runloop for up to 30 seconds to allow incoming connections to be cleanly shut down. _______________________________________________ Gnustep-dev mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gnustep-dev
