drop message sends if message has no return instead of throw error
Some checks failed
Build and Deploy / build-macos (push) Failing after 6s
Build and Deploy / build-windows (CLANG64) (push) Has been cancelled
Build and Deploy / package-dist (push) Has been cancelled
Build and Deploy / deploy-itch (push) Has been cancelled
Build and Deploy / deploy-gitea (push) Has been cancelled
Build and Deploy / build-linux (push) Has been cancelled
Some checks failed
Build and Deploy / build-macos (push) Failing after 6s
Build and Deploy / build-windows (CLANG64) (push) Has been cancelled
Build and Deploy / package-dist (push) Has been cancelled
Build and Deploy / deploy-itch (push) Has been cancelled
Build and Deploy / deploy-gitea (push) Has been cancelled
Build and Deploy / build-linux (push) Has been cancelled
This commit is contained in:
@@ -509,7 +509,11 @@ function actor_prep(actor, send) {
|
||||
}
|
||||
|
||||
function actor_send(actor, message) {
|
||||
if (!is_actor(actor)) throw new Error(`Must send to an actor object. Attempted send to ${json.encode(actor)}`)
|
||||
if (actor[HEADER] && !actor[HEADER].replycc) // attempting to respond to a message but sender is not expecting; silently drop
|
||||
return
|
||||
|
||||
if (!is_actor(actor) ) throw new Error(`Must send to an actor object. Attempted send to ${json.encode(actor)}`)
|
||||
|
||||
if (typeof message !== 'object') throw new Error('Must send an object record.')
|
||||
|
||||
// message to self
|
||||
|
||||
@@ -19,7 +19,7 @@ send(act, {kind:"window", op: "create"}, ({id}) => {
|
||||
renderer = id
|
||||
console.log(`made renderer with id ${id}`)
|
||||
|
||||
send(act, {kind:"renderer", id: renderer, op:"set", prop: "drawColor", value:[0.6,0.4,0.5,1]}, handle_response)
|
||||
send(act, {kind:"renderer", id: renderer, op:"set", prop: "drawColor", value:[0.6,0.4,0.5,1]})
|
||||
send(act, {kind:"renderer", id: renderer, op:"clear"}, handle_response)
|
||||
send(act, {kind:"renderer", id: renderer, op: "present"}, handle_response)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user