File tree Expand file tree Collapse file tree
packages/powersync/lib/src/web/http Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,16 +49,21 @@ final class RemoteHttpServer {
4949 throw ArgumentError ('Unknown HTTP transaction: $transactionId ' );
5050 }
5151
52- if (await response.moveNext ()) {
53- return _byteListToArrayBuffer (response.current);
54- } else if (state._abortController.isCompleted) {
55- throw RequestAbortedException ();
56- } else {
57- // End of stream
58- _pendingTransactions.remove (transactionId);
52+ try {
53+ if (await response.moveNext ()) {
54+ return _byteListToArrayBuffer (response.current);
55+ } else if (state._abortController.isCompleted) {
56+ throw RequestAbortedException ();
57+ } else {
58+ // End of stream
59+ _pendingTransactions.remove (transactionId);
60+ state.close ();
61+
62+ return null ;
63+ }
64+ } on Object {
5965 state.close ();
60-
61- return null ;
66+ rethrow ;
6267 }
6368 }
6469
You can’t perform that action at this time.
0 commit comments