Commit ec432feb authored by djamel's avatar djamel

ajout d'un timeout lors de la connection au serveur

parent d1121edc
......@@ -66,6 +66,7 @@ public class Login extends ActionBarActivity implements View.OnClickListener {
}
else {
AsyncHttpClient client = new AsyncHttpClient();
client.setTimeout(5000);
client.get(server + "/keys", new JsonHttpResponseHandler() {
@Override
......
......@@ -175,6 +175,7 @@ public class Read_QR_Code extends ActionBarActivity implements View.OnClickListe
// Send Post Request
AsyncHttpClient client = new AsyncHttpClient();
client.setTimeout(5000);
client.post(this, server + "/validate", entity, "application/json",
new JsonHttpResponseHandler() {
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment