mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-08-29 05:38:51 +00:00
Handle captcha exception on PlatformClientPool
This commit is contained in:
parent
bbcc424393
commit
f9b772b729
1 changed files with 6 additions and 0 deletions
|
@ -6,6 +6,7 @@ import com.futo.platformplayer.api.media.platforms.js.JSClient
|
|||
import com.futo.platformplayer.constructs.Event1
|
||||
import com.futo.platformplayer.constructs.Event2
|
||||
import com.futo.platformplayer.logging.Logger
|
||||
import com.futo.platformplayer.states.StateApp
|
||||
|
||||
class PlatformClientPool {
|
||||
private val _parent: JSClient;
|
||||
|
@ -51,6 +52,11 @@ class PlatformClientPool {
|
|||
if(reserved == null && _pool.size < capacity) {
|
||||
Logger.i(TAG, "Started additional [${_parent.name}] client in pool [${_poolName}] (${_pool.size + 1}/${capacity})");
|
||||
reserved = _parent.getCopy();
|
||||
|
||||
reserved?.onCaptchaException?.subscribe { client, ex ->
|
||||
StateApp.instance.handleCaptchaException(client, ex);
|
||||
};
|
||||
|
||||
reserved?.initialize();
|
||||
_pool[reserved!!] = _poolCounter;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue