Hi Petr,
Finally got a look at your latest changes to TrackerRequestSession, sorry for the delay!
\todo What should be the difference between this function and the close()
function? It seems to me that there is nothing to “really” abort…
I think that the current close() behavior actually should be the abort() behavior. Transport and Session distinguish between close() and abort() - close() is a graceful close, which may take longer and will be completed asynchronously, abort() is an abrupt close which will succeed immediately (synchronously). One would in general use close(), however under certain circumstances, e.g. if the application is closing, you would want to abort(), so that you could delete the object right after abort() returns. It should be possible to abort a session/connection that is closing.
146 call (session->handleResponseBody (responseBody))
147 .willCall (sessionStatus->trackerRequestSessionResponseRecieved (
148 trackerResponse))
149 .returns()
150 .willCall (httpRequestSession->close())
151 .returns()
152 .willCall (sessionStatus->trackerRequestSessionClosed())
153 .returns()
154 .returns();
would become:
call (session->handleResponseBody (responseBody))
.willCall (sessionStatus->trackerRequestSessionResponseRecieved (
trackerResponse))
.returns()
.willCall (httpRequestSession->close())
.returns()
.returns();
httpRequestSession->calls (session->httpRequestSessionClosed())
.willCall (sessionStatus->trackerRequestSessionClosed())
.returns()
.returns();
Regards,
Peter
