undo try blocks; that's not the traceback's source
This commit is contained in:
parent
468e0815b3
commit
7c4d636f83
|
@ -184,12 +184,9 @@ proc sendErrorResponse(peer: Peer,
|
|||
debug "Received an invalid request",
|
||||
peer, msgName, msgBytes, errMsg = err.formatMsg("<msg>")
|
||||
|
||||
try:
|
||||
let responseBytes = encodeErrorMsg(InvalidRequest, err.formatMsg("msg"))
|
||||
await stream.writeAllBytes(responseBytes)
|
||||
await stream.close()
|
||||
except Exception as err:
|
||||
debug "Error during sendErrorResponse()", error = err.msg
|
||||
|
||||
proc sendErrorResponse(peer: Peer,
|
||||
stream: P2PStream,
|
||||
|
@ -197,12 +194,9 @@ proc sendErrorResponse(peer: Peer,
|
|||
errMsg: string) {.async.} =
|
||||
debug "Error processing request", peer, responseCode, errMsg
|
||||
|
||||
try:
|
||||
let responseBytes = encodeErrorMsg(ServerError, errMsg)
|
||||
await stream.writeAllBytes(responseBytes)
|
||||
await stream.close()
|
||||
except Exception as err:
|
||||
debug "Error during sendErrorResponse()", error = err.msg
|
||||
|
||||
proc sendNotificationMsg(peer: Peer, protocolId: string, requestBytes: Bytes) {.async} =
|
||||
var deadline = sleepAsync RESP_TIMEOUT
|
||||
|
|
Loading…
Reference in New Issue