title: Realm object server sync on low connection.
body: <p>i have an realm object server and tries to sync data with android device like:</p>
  
  <pre><code>SyncCredentials syncCred = SyncCredentials
              .usernamePassword(username, password, false);
  SyncUser.loginAsync(syncCred, url, new SyncUser.Callback() {
          @Override
          public void onSuccess(SyncUser user) {
          ...some code...
          }
  
          @Override
          public void onError(ObjectServerError error) {}
  </code></pre>
  
  <p>it works just fine with <code>wi-fi</code> but in case on low Internet connection (for example set up <code>GSM</code> network type for emulator) i got an error (<code>onError (ObjectServerError error)</code> calls):</p>
  
  <pre><code>java.net.ProtocolException: unexpected end of stream
  at okhttp3.internal.http.Http1xStream$FixedLengthSource.read(Http1xStream.java:380)
  at okio.Buffer.writeAll(Buffer.java:993)
  at okio.RealBufferedSource.readByteArray(RealBufferedSource.java:106)
  at okhttp3.ResponseBody.bytes(ResponseBody.java:128)
  at okhttp3.ResponseBody.string(ResponseBody.java:154)
  at io.realm.internal.network.AuthenticateResponse.from(AuthenticateResponse.java:51)
  at io.realm.internal.network.OkHttpAuthenticationServer.authenticate(OkHttpAuthenticationServer.java:125)
  at io.realm.internal.network.OkHttpAuthenticationServer.loginUser(OkHttpAuthenticationServer.java:53)
  at io.realm.SyncUser.login(SyncUser.java:199)
  at io.realm.SyncUser$1.run(SyncUser.java:234)
  at io.realm.SyncUser$Request$1.run(SyncUser.java:585)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
  at java.util.concurrent.FutureTask.run(FutureTask.java:237)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
  at java.lang.Thread.run(Thread.java:761)
  
  at io.realm.internal.network.AuthenticateResponse.from(AuthenticateResponse.java:53)
  at io.realm.internal.network.OkHttpAuthenticationServer.authenticate(OkHttpAuthenticationServer.java:125)
  at io.realm.internal.network.OkHttpAuthenticationServer.loginUser(OkHttpAuthenticationServer.java:53)
  at io.realm.SyncUser.login(SyncUser.java:199)
  at io.realm.SyncUser$1.run(SyncUser.java:234)
  at io.realm.SyncUser$Request$1.run(SyncUser.java:585)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
  at java.util.concurrent.FutureTask.run(FutureTask.java:237)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
  at java.lang.Thread.run(Thread.java:761)
  </code></pre>
  
  <p>is it possible to sync data via low Internet connection? </p>