File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ class DataSyncController {
5454 // When doing optimistic inserts, we want to optimistically set the `createdAt` field, if the record will have such a field after insert
5555 // For that we need to keep track of all tables that have a `createdAt` field.
5656 this . optimisticCreatedNeedsCreatedAtField = new Set ( ) ;
57+
58+ // The websocket times out after not receiving a reply for 5 seconds
59+ this . messageTimeout = 5000 ;
5760 }
5861
5962 async startConnection ( ) {
@@ -174,7 +177,7 @@ class DataSyncController {
174177 this . connection . send ( JSON . stringify ( payload ) ) ;
175178
176179 if ( ! this . pendingRequestTimeout ) {
177- this . pendingRequestTimeout = setTimeout ( this . onPendingRequestTimeout . bind ( this ) , 5000 ) ;
180+ this . pendingRequestTimeout = setTimeout ( this . onPendingRequestTimeout . bind ( this ) , this . messageTimeout ) ;
178181 }
179182 }
180183 } ) ;
You can’t perform that action at this time.
0 commit comments