mirror of
https://github.com/curl/curl.git
synced 2026-08-24 15:03:34 +03:00
lib: add CURLINFO_CONN_ID and CURLINFO_XFER_ID
- add an `id` long to Curl_easy, -1 on init - once added to a multi (or its own multi), it gets a non-negative number assigned by the connection cache - `id` is unique among all transfers using the same cache until reaching LONG_MAX where it will wrap around. So, not unique eternally. - CURLINFO_CONN_ID returns the connection id attached to data or, if none present, data->state.lastconnect_id - variables and type declared in tool for write out Closes #11185
This commit is contained in:
parent
fdda99c6ee
commit
e024d5665d
31 changed files with 252 additions and 94 deletions
|
|
@ -1534,7 +1534,7 @@ static CURLcode telnet_do(struct Curl_easy *data, bool *done)
|
|||
}
|
||||
|
||||
while(keepon) {
|
||||
DEBUGF(infof(data, "telnet_do(handle=%p), poll %d fds", data, poll_cnt));
|
||||
DEBUGF(infof(data, "telnet_do, poll %d fds", poll_cnt));
|
||||
switch(Curl_poll(pfd, poll_cnt, interval_ms)) {
|
||||
case -1: /* error, stop reading */
|
||||
keepon = FALSE;
|
||||
|
|
@ -1558,8 +1558,7 @@ static CURLcode telnet_do(struct Curl_easy *data, bool *done)
|
|||
* in a clean way? Seems to be timing related, happens more
|
||||
* on slow debug build */
|
||||
if(data->state.os_errno == ECONNRESET) {
|
||||
DEBUGF(infof(data, "telnet_do(handle=%p), unexpected ECONNRESET"
|
||||
" on recv", data));
|
||||
DEBUGF(infof(data, "telnet_do, unexpected ECONNRESET on recv"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue