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

Open
@yashixfi

Description

@yashixfi

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)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions