-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Candidate/2.8.4 #21
Candidate/2.8.4 #21
Conversation
Add heartbeat tests
…ntation - AbstractCBLWebSocket is now thread safe - StateMachine no longer attempts to be thread safe - AbstractCBLWebSocket now handles close in CONNECTING state - AbstractCBLWebSocket state machine now correctly handles remote close request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look good to me. I have a couple of minor questions that I commented in the change.
socket.getHttpClient().pingIntervalMillis()); | ||
} | ||
finally { | ||
repl.stop(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it OK to not wait until the replicator's stopped before returning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After thought, I guessed it's OK, because the tear down will delete or close database and it will wait for the replicator to stop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤞
android/main/java/com/couchbase/lite/internal/CouchbaseLiteInternal.java
Show resolved
Hide resolved
common/main/cpp/native_c4base.cc
Outdated
@@ -36,7 +36,7 @@ using namespace litecore::jni; | |||
*/ | |||
JNIEXPORT void JNICALL Java_com_couchbase_lite_internal_core_C4Base_debug(JNIEnv *env, jclass ignore) { | |||
c4log_enableFatalExceptionBacktrace(); | |||
c4log_getWarnOnErrors(); | |||
c4log_warnOnErrors(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would caution that this will end up being noisy, and logging exceptions whenever they are thrown, even if they don't cause an actual issue (i.e .they are caught and handled later)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. Will take it out and put it back in 3.0, protected by the "DEBUGGING" flag.
return n; | ||
} | ||
|
||
public static long assertNotNegative(long n, @NonNull String name) { | ||
if (n < 0) { throw new IllegalArgumentException(name + " must be negative"); } | ||
if (n < 0) { throw new IllegalArgumentException(name + " must must not be <0"); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double must
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Add heartbeat tests
CBL-1624: Fix logging bugs
Fix some bugs introduced by the state-machine based implementation of AbstractCBLWebSocket
- AbstractCBLWebSocket is now thread safe
- StateMachine no longer attempts to be thread safe
- AbstractCBLWebSocket now handles close in CONNECTING state
- AbstractCBLWebSocket state machine now correctly handles remote close request.
(Introduce a new state: CLOSE_REQUESTED and handle it properly)