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,6 +54,7 @@ public class lib3270 | ||
| 54 | 54 | ||
| 55 | private static NetworkThread mainloop = null; | 55 | private static NetworkThread mainloop = null; |
| 56 | private static boolean connected = false; | 56 | private static boolean connected = false; |
| 57 | + private static boolean reconnect = false; | ||
| 57 | private static boolean refresh = true; | 58 | private static boolean refresh = true; |
| 58 | private static Socket sock = null; | 59 | private static Socket sock = null; |
| 59 | 60 | ||
| @@ -264,8 +265,6 @@ public class lib3270 | @@ -264,8 +265,6 @@ public class lib3270 | ||
| 264 | 265 | ||
| 265 | public void run() | 266 | public void run() |
| 266 | { | 267 | { |
| 267 | - boolean reconnect = false; | ||
| 268 | - | ||
| 269 | info(TAG, "Network thread started"); | 268 | info(TAG, "Network thread started"); |
| 270 | reconnect = connected = connect(); | 269 | reconnect = connected = connect(); |
| 271 | 270 | ||
| @@ -454,7 +453,7 @@ public class lib3270 | @@ -454,7 +453,7 @@ public class lib3270 | ||
| 454 | public int disconnect() | 453 | public int disconnect() |
| 455 | { | 454 | { |
| 456 | Log.v(TAG, "Disconnecting"); | 455 | Log.v(TAG, "Disconnecting"); |
| 457 | - connected = false; | 456 | + connected = reconnect = false; |
| 458 | 457 | ||
| 459 | if(sock != null) | 458 | if(sock != null) |
| 460 | { | 459 | { |