-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
bugSomething isn't workingSomething isn't working
Description
π Reproduction steps
sdk-for-android/library/src/main/java/io/appwrite/services/Realtime.kt
Lines 116 to 123 in 85fac9d
| launch { | |
| subCallDepth++ | |
| delay(DEBOUNCE_MILLIS) | |
| if (subCallDepth == 1) { | |
| createSocket() | |
| } | |
| subCallDepth-- | |
| } |
when call this job in multiple threads ,it may call createSocket twice times or more?
π Expected behavior
when call this job in multiple threads ,it may call createSocket once. It will be ok by this code .
private var subCallDepth = AtomicInteger(0)
delay(DEBOUNCE_MILLIS)
if (subCallDepth.compareAndSet(0,1)) {
createSocket()
}π Actual Behavior
it may call createSocket twice times or more?
π² Appwrite version
Appwrite Cloud
π» Operating system
Linux
π§± Your Environment
android
π Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
π’ Have you read the Code of Conduct?
- I have read the Code of Conduct
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working