mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-24 14:45:56 +00:00
Clean up error handling in plugin
This commit is contained in:
@@ -22,18 +22,18 @@ function Session.new(config)
|
|||||||
api:connect()
|
api:connect()
|
||||||
:andThen(function()
|
:andThen(function()
|
||||||
if self.disconnected then
|
if self.disconnected then
|
||||||
return Promise.resolve()
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
return api:read({api.rootInstanceId})
|
return api:read({api.rootInstanceId})
|
||||||
:andThen(function(response)
|
end)
|
||||||
if self.disconnected then
|
:andThen(function(response)
|
||||||
return Promise.resolve()
|
if self.disconnected then
|
||||||
end
|
return
|
||||||
|
end
|
||||||
|
|
||||||
self.reconciler:reconcile(response.instances, api.rootInstanceId, game)
|
self.reconciler:reconcile(response.instances, api.rootInstanceId, game)
|
||||||
return self:__processMessages()
|
return self:__processMessages()
|
||||||
end)
|
|
||||||
end)
|
end)
|
||||||
:catch(function(message)
|
:catch(function(message)
|
||||||
self.disconnected = true
|
self.disconnected = true
|
||||||
|
|||||||
Reference in New Issue
Block a user