Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] Nullpointer in commsReceiver

I very rarely encounter the following problem:

Exception in thread "MQTT Rec: backend1" java.lang.NullPointerException
        at
org.eclipse.paho.client.mqttv3.internal.ClientState.notifyResult(ClientState.java:1001)
        at
org.eclipse.paho.client.mqttv3.internal.ClientState.notifyReceivedAck(ClientState.java:842)
        at
org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:119)
        at java.lang.Thread.run(Thread.java:722)


It seems like token can be NULL sometimes under high load. In the
commsreceiver the token is actually checked to see it's not null, but
when it's retrieved from the tokenstore in ClientState for the second
time, it doesn't seem to be there anymore.

Is this a race condition? Would it improve anything if I just pass the
retrieved token to ClientState as a parameter instead of getting it from
the tokenstore again?

Thanks,

Maarten van Schouwenburg





Back to the top