Commit 981b1118c309cc0bcf812be6a95bbd130e20d157
1 parent
9bea3523
Exists in
master
and in
5 other branches
Android - Corrigindo desconexão ao rodar a tela
Showing
1 changed file
with
2 additions
and
3 deletions
Show diff stats
android/src/br/com/bb/pw3270/lib3270.java
| ... | ... | @@ -54,6 +54,7 @@ public class lib3270 |
| 54 | 54 | |
| 55 | 55 | private static NetworkThread mainloop = null; |
| 56 | 56 | private static boolean connected = false; |
| 57 | + private static boolean reconnect = false; | |
| 57 | 58 | private static boolean refresh = true; |
| 58 | 59 | private static Socket sock = null; |
| 59 | 60 | |
| ... | ... | @@ -264,8 +265,6 @@ public class lib3270 |
| 264 | 265 | |
| 265 | 266 | public void run() |
| 266 | 267 | { |
| 267 | - boolean reconnect = false; | |
| 268 | - | |
| 269 | 268 | info(TAG, "Network thread started"); |
| 270 | 269 | reconnect = connected = connect(); |
| 271 | 270 | |
| ... | ... | @@ -454,7 +453,7 @@ public class lib3270 |
| 454 | 453 | public int disconnect() |
| 455 | 454 | { |
| 456 | 455 | Log.v(TAG, "Disconnecting"); |
| 457 | - connected = false; | |
| 456 | + connected = reconnect = false; | |
| 458 | 457 | |
| 459 | 458 | if(sock != null) |
| 460 | 459 | { | ... | ... |