Skip to content

Some socket events after some times stops being received at all in the app side, even on subscribing to those events they are not received. #787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yashixfi opened this issue May 9, 2025 · 0 comments
Labels

Comments

@yashixfi
Copy link

yashixfi commented May 9, 2025

Can there be possibility that the socket events even if subscribed not being received at all but other events are being received but some particular events even after subscribing to the events are not being received. Using latest Socket IO version 2.1.2.

This is my socket IO creation code

@NetworkModule.IxfiSocket
@singleton
@provides
fun provideSocket(option: IO.Options) =
IO.socket(BuildConfig.SOCKET_URL, option)!!

@Singleton
@Provides
fun getSocketOptions(@NetworkModule.SocketService client: OkHttpClient): IO.Options {
    val opts = IO.Options()
    opts.callFactory = client
    opts.reconnection = true
    opts.timeout = 60 * 1000
    opts.webSocketFactory = client
    return opts
}

fun subscribeTxnEvents() {
socketIo.off(AppConstants.EVENT_TXN_STATUS)
socketIo.on(AppConstants.EVENT_TXN_STATUS, onEventTxnStatus)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant