panic recover handleCall
This commit is contained in:
parent
e66e0c6cae
commit
0e6a217c14
@ -110,6 +110,12 @@ func (ipc *ipcCommon) handleCall(msg Message) {
|
||||
ipc.processingCalls.Add(1)
|
||||
defer ipc.processingCalls.Add(-1)
|
||||
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
ipc.sendResponse(msg.Id, nil, fmt.Errorf("handle call panicked: %s", err))
|
||||
}
|
||||
}()
|
||||
|
||||
method, err := ipc.findMethod(msg.Method)
|
||||
if err != nil {
|
||||
ipc.sendResponse(msg.Id, nil, fmt.Errorf("find method: %w", err))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user