Commit 8a9c13d
Kevin Cernekee
Bug: 480134 - Wakelock not released in AlarmPingSender
Setting up callbacks after initiating the background ping can cause
a race condition, in which the operation completes before the callbacks
are set. In this case, onSuccess() or onFailure() will not run, and
the wakelock will never be released.
To prevent this, specify a IMqttActionListener when creating the token.
Change-Id: I25f898e9558d16b61e9102adcf76fe7f2335ea2f
Signed-off-by: Kevin Cernekee <cernekee@google.com>1 parent 02fb470 commit 8a9c13d
1 file changed
Lines changed: 12 additions & 20 deletions
File tree
- org.eclipse.paho.android.service/org.eclipse.paho.android.service/src/main/java/org/eclipse/paho/android/service
Lines changed: 12 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
136 | 135 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
141 | 140 | | |
142 | 141 | | |
143 | 142 | | |
144 | 143 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 144 | + | |
153 | 145 | | |
154 | 146 | | |
155 | 147 | | |
156 | 148 | | |
157 | 149 | | |
158 | 150 | | |
159 | | - | |
160 | | - | |
161 | | - | |
| 151 | + | |
162 | 152 | | |
163 | 153 | | |
164 | 154 | | |
165 | 155 | | |
166 | | - | |
| 156 | + | |
167 | 157 | | |
168 | 158 | | |
169 | 159 | | |
170 | | - | |
171 | | - | |
172 | | - | |
| 160 | + | |
173 | 161 | | |
174 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
175 | 167 | | |
176 | 168 | | |
177 | 169 | | |
0 commit comments