Skip to content

Commit 9e8bac2

Browse files
committed
Fix crud uploads for websockets
1 parent 383ba30 commit 9e8bac2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 1.2.2
4+
5+
* Supabase: Avoid creating `Json` serializers multiple times.
6+
* Fix local writes not being uploaded correctly when using WebSockets as a transport protocol.
7+
38
## 1.2.1
49

510
* [Supabase Connector] Fixed issue where only `400` HTTP status code errors where reported as connection errors. The connector now reports errors for codes `>=400`.

core/src/commonMain/kotlin/com/powersync/sync/SyncStream.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,13 +424,13 @@ internal class SyncStream(
424424
}
425425

426426
private suspend fun line(text: String) {
427-
triggerCrudUploadIfFirstLine()
428427
control("line_text", text)
428+
triggerCrudUploadIfFirstLine()
429429
}
430430

431431
private suspend fun line(blob: ByteArray) {
432-
triggerCrudUploadIfFirstLine()
433432
control("line_binary", blob)
433+
triggerCrudUploadIfFirstLine()
434434
}
435435

436436
private suspend fun connect(start: Instruction.EstablishSyncStream) {

0 commit comments

Comments
 (0)