delight-im / Android-DDP

[UNMAINTAINED] Meteor's Distributed Data Protocol (DDP) for clients on Android
Apache License 2.0
274 stars 54 forks source link

Stop receiving callback #66

Closed mbmc closed 8 years ago

mbmc commented 8 years ago

I have 6 devices connected to a local meteor server but after few minutes of inactivity, some of the devices stop getting callbacks (no disconnect or exception prior to that). Even if I call .disconnect then .reconnect, it won't reconnect.

Any idea why would that happen?

ocram commented 8 years ago

Thanks for this report!

If this is indeed a bug, we should definitely fix this as soon as possible.

Can you try performing some action on the Meteor connection every few seconds? This should allow us to see if the problems occur due to inactivity.

long interval = 5000;
Timer timer = new Timer();
timer.scheduleAtFixedRate(new TimerTask() {

    @Override
    synchronized public void run() {
        mMeteor.call("someNonExistentMethodForExample");
    }

}}, interval, interval);