I’m initially setting the push replication as follows:
final URL url = new URL("http://localhost:4984/spark/");
// Create Pull
mPullReplication = mDatabase.createPullReplication(url);
mPullReplication.addChangeListener(new Replication.ChangeListener() {
@Override
public void changed(Replication.ChangeEvent changeEvent) {
Throwable err = null;
if ((err = changeEvent.getError()) != null) {
Log.e(TAG, "Error!");
err.printStackTrace();
} else {
Log.e(TAG, "Help: " + changeEvent.toString());
Log.e(TAG, "Changes count: " + mPullReplication.getChangesCount());
}
}
});
mPullReplication.setContinuous(true);
mPullReplication.start();
Trouble is right after I run this code I get this in the log:
PullerInternal stopGraceful.run() finished
ChangeTracker-http://52.7.74.93:4984/spark/ calls detach''
If I wait I receive this error:
Exception in change tracker
java.netSocketTimeoutException
Any ideas as to what I’m doing wrong?