multi: progress function abort must close connection
authorDaniel Stenberg <daniel@haxx.se>
Sun, 2 Oct 2011 17:28:39 +0000 (19:28 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 2 Oct 2011 17:28:39 +0000 (19:28 +0200)
commit9dd85bced56f6951107f69e581c872c1e7e3e58e
treead4e006e3571bcdb150a50e396aa3ed3454ced9e
parent5d45285cf39c27135542edcbbadc71c1bd3d90ab
multi: progress function abort must close connection

When the progress function returns to cancel the request, we must mark
the connection to get closed and it must do to the DONE state.

do_init() must be called as early as possible so that state variables
for new connections are reset early. We could otherwise see that the old
values were still there when a connection was to be disconnected very
early and it would make it behave wrongly.

Bug: http://curl.haxx.se/mail/lib-2011-10/0006.html
Reported by: Vladimir Grishchenko
lib/multi.c
lib/url.c