mirror of
https://github.com/enso-org/enso.git
synced 2024-11-22 11:52:59 +03:00
Don't wait on runtime confirmation when opening
Ydoc doesn't like delays so if opening a file takes a considerably more time than usual (locking, more files to compile), ydoc will bail and fail to initiialize properly. This is rather trivially reproducible by adding `Thread.sleep(20*000)` to OpenFileCmd but automatic testing is non-trivial.
This commit is contained in:
parent
451d7cb452
commit
fccb9500e1
@ -179,13 +179,10 @@ class CollaborativeBuffer(
|
||||
)
|
||||
} else {
|
||||
logger.warn("Timeout reached when awaiting response from the server")
|
||||
replyTo ! OpenFileResponse(Left(OperationTimeout))
|
||||
stop(Map.empty)
|
||||
}
|
||||
case Api.Response(Some(id), Api.OpenFileResponse) if id == requestId =>
|
||||
timeout.cancel()
|
||||
val cap = CapabilityRegistration(CanEdit(bufferPath))
|
||||
replyTo ! OpenFileResponse(Right(OpenFileResult(buffer, Some(cap))))
|
||||
unstashAll()
|
||||
context.become(
|
||||
collaborativeEditing(
|
||||
@ -894,6 +891,8 @@ class CollaborativeBuffer(
|
||||
self,
|
||||
ServerConfirmationTimeout
|
||||
)
|
||||
val cap = CapabilityRegistration(CanEdit(bufferPath))
|
||||
replyTo ! OpenFileResponse(Right(OpenFileResult(buffer, Some(cap))))
|
||||
context.become(
|
||||
waitingOnServerConfirmation(
|
||||
requestId,
|
||||
|
Loading…
Reference in New Issue
Block a user