Skip to content

Commit

Permalink
continue to process messages when exceptions occur (#4870)
Browse files Browse the repository at this point in the history
  • Loading branch information
patnir authored Apr 4, 2024
1 parent f5620a3 commit df8ae60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ironfish/src/rpc/adapters/socketAdapter/socketAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,14 @@ export abstract class RpcSocketAdapter implements IRpcAdapter {
const [parsed, error] = JSONUtils.tryParse(rpcMessage)
if (error) {
this.emitResponse(client, this.constructMalformedRequest(data))
return
continue
}

const result = await YupUtils.tryValidate(RpcSocketClientMessageSchema, parsed)

if (result.error) {
this.emitResponse(client, this.constructMalformedRequest(parsed))
return
continue
}

const message = result.result.data
Expand Down Expand Up @@ -253,7 +253,7 @@ export abstract class RpcSocketAdapter implements IRpcAdapter {
})

this.emitResponse(client, response, requestId)
return
continue
}

throw error
Expand Down

0 comments on commit df8ae60

Please sign in to comment.