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 {
|
} else {
|
||||||
logger.warn("Timeout reached when awaiting response from the server")
|
logger.warn("Timeout reached when awaiting response from the server")
|
||||||
replyTo ! OpenFileResponse(Left(OperationTimeout))
|
|
||||||
stop(Map.empty)
|
stop(Map.empty)
|
||||||
}
|
}
|
||||||
case Api.Response(Some(id), Api.OpenFileResponse) if id == requestId =>
|
case Api.Response(Some(id), Api.OpenFileResponse) if id == requestId =>
|
||||||
timeout.cancel()
|
timeout.cancel()
|
||||||
val cap = CapabilityRegistration(CanEdit(bufferPath))
|
|
||||||
replyTo ! OpenFileResponse(Right(OpenFileResult(buffer, Some(cap))))
|
|
||||||
unstashAll()
|
unstashAll()
|
||||||
context.become(
|
context.become(
|
||||||
collaborativeEditing(
|
collaborativeEditing(
|
||||||
@ -894,6 +891,8 @@ class CollaborativeBuffer(
|
|||||||
self,
|
self,
|
||||||
ServerConfirmationTimeout
|
ServerConfirmationTimeout
|
||||||
)
|
)
|
||||||
|
val cap = CapabilityRegistration(CanEdit(bufferPath))
|
||||||
|
replyTo ! OpenFileResponse(Right(OpenFileResult(buffer, Some(cap))))
|
||||||
context.become(
|
context.become(
|
||||||
waitingOnServerConfirmation(
|
waitingOnServerConfirmation(
|
||||||
requestId,
|
requestId,
|
||||||
|
Loading…
Reference in New Issue
Block a user