mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
fix bogus error return on timeout for gameserver connect
This commit is contained in:
parent
836ddd0aff
commit
9b0507a4c6
@ -847,3 +847,13 @@ is_download_complete() const {
|
||||
return (_download_dest != DD_none &&
|
||||
(_state == S_read_body || _state == S_read_trailer));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: HTTPChannel::StatusEntry::Constructor
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE HTTPChannel::StatusEntry::
|
||||
StatusEntry() {
|
||||
_status_code = SC_incomplete;
|
||||
}
|
||||
|
@ -745,17 +745,31 @@ reached_done_state() {
|
||||
// response; go back and find the best one.
|
||||
if (!_status_list.empty()) {
|
||||
_status_list.push_back(_status_entry);
|
||||
if (downloader_cat.is_spam()) {
|
||||
downloader_cat.spam()
|
||||
if (downloader_cat.is_debug()) {
|
||||
downloader_cat.debug()
|
||||
<< "Reexamining failure responses.\n";
|
||||
}
|
||||
size_t best_i = 0;
|
||||
if (downloader_cat.is_debug()) {
|
||||
downloader_cat.debug()
|
||||
<< " " << 0 << ". " << _status_list[0]._status_code << " "
|
||||
<< _status_list[0]._status_string << "\n";
|
||||
}
|
||||
for (size_t i = 1; i < _status_list.size(); i++) {
|
||||
if (downloader_cat.is_debug()) {
|
||||
downloader_cat.debug()
|
||||
<< " " << i << ". " << _status_list[i]._status_code << " "
|
||||
<< _status_list[i]._status_string << "\n";
|
||||
}
|
||||
if (more_useful_status_code(_status_list[i]._status_code,
|
||||
_status_list[best_i]._status_code)) {
|
||||
best_i = i;
|
||||
}
|
||||
}
|
||||
if (downloader_cat.is_debug()) {
|
||||
downloader_cat.debug()
|
||||
<< "chose index " << best_i << ", above.\n";
|
||||
}
|
||||
_status_entry = _status_list[best_i];
|
||||
_status_list.clear();
|
||||
}
|
||||
|
@ -281,6 +281,7 @@ public:
|
||||
private:
|
||||
class StatusEntry {
|
||||
public:
|
||||
INLINE StatusEntry();
|
||||
int _status_code;
|
||||
string _status_string;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user