
Try next proxy when error occurs August 09, 2009 01:04PM |
Registered: 16 years ago Posts: 7 |
) but about two days later only 3 or 4 of them still worked. So, using the same list, trying to download 8 files resulted in most of them being stuck, usellesly reconecting to the same (unworking) proxies over and over again.
Re: Try next proxy when error occurs August 09, 2009 01:53PM |
Admin Registered: 20 years ago Posts: 2,426 |
Re: Try next proxy when error occurs August 09, 2009 02:05PM |
Registered: 16 years ago Posts: 7 |
Re: Try next proxy when error occurs August 09, 2009 02:11PM |
Admin Registered: 20 years ago Posts: 2,426 |
Language: Javapublic List<ConnectionSettings> getRotatedEnabledConnections() { synchronized (connectionSettingsLock) { final List<ConnectionSettings> list = new ArrayList<ConnectionSettings>(availableConnections.size()); for (ConnectionSettings settings : availableConnections) { if (settings.isEnabled() && !settings.isDefault()) { list.add(settings); } } if (list.size() > 1) {//rotate enabled proxies Collections.rotate(list, rotate++); } if (useDefaultConnection() && defaultConnectionSettings.isEnabled()) list.add(0, defaultConnectionSettings); return list; } }

Re: Try next proxy when error occurs August 11, 2009 03:25PM |
Registered: 16 years ago Posts: 7 |
. Of course, this shouldn't apply to the standard 15 min waiting time... I can imagine this will be a b*tch to code but it would make me really happy
).