~singpolyma/cheogram-android

49ae9607267a0d81ad08f03c6a0bca6c8f05f41e — Stephen Paul Weber 1 year, 7 months ago 2156435 2.12.1-5
Reusing TimerTask sometimes fails
1 files changed, 7 insertions(+), 1 deletions(-)

M src/main/java/eu/siacs/conversations/entities/Conversation.java
M src/main/java/eu/siacs/conversations/entities/Conversation.java => src/main/java/eu/siacs/conversations/entities/Conversation.java +7 -1
@@ 1451,7 1451,13 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
                @Override
                public void run() {
                    if (getAccount().getStatus() != Account.State.ONLINE) {
                        new Timer().schedule(this, 1000);
                        final TimerTask self = this;
                        new Timer().schedule(new TimerTask() {
                            @Override
                            public void run() {
                                self.run();
                            }
                        }, 1000);
                    } else {
                        xmppConnectionService.sendIqPacket(getAccount(), packet, (a, iq) -> {
                            session.updateWithResponse(iq);