Skip to content
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

Concurrent request at API causes 125002: Session error #28

Open
zinen opened this issue Jan 25, 2023 · 1 comment
Open

Concurrent request at API causes 125002: Session error #28

zinen opened this issue Jan 25, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@zinen
Copy link
Contributor

zinen commented Jan 25, 2023

It seems that if requesting data using the same session but requesting varied data via concurrent 2-3 request causes a 125002: Session error. I figure maybe a queue system of some sort could be implemented?

I cant code typescript so no PR from me this time...

Example code that causes trouble:

const huaweiLteApi = require('huawei-lte-api');
const connection = new huaweiLteApi.Connection('http://admin:password@192.168.8.1/');
async function start() {
    try {
        await connection.ready()
        const device = new huaweiLteApi.Device(connection);
        const dialUp = new huaweiLteApi.DialUp(connection)
        const getTheeDataPoints = await Promise.all([device.signal(), device.information(), dialUp.mobileDataswitch()])
        console.log(getTheeDataPoints)
    } catch (error) {
        console.error(error.message);
    }
}
start()
@Salamek
Copy link
Owner

Salamek commented Jan 25, 2023

Hmm i'm not sure if that is something we should be solving in this library? I would suggest implement some kind of queue in your implementation for now... Ill will keep this issue open for now

@Salamek Salamek added the enhancement New feature or request label Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants