mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
check for nil stream when running the null check in handler (#7105)
This commit is contained in:
parent
94729b1e82
commit
165a6a950d
@ -524,6 +524,9 @@ var nullAsBytes = []byte{110, 117, 108, 108}
|
||||
// there are many avenues that could lead to an error being handled in runMethod, so we need to check
|
||||
// if nil has already been written to the stream before writing it again here
|
||||
func writeNilIfNotPresent(stream *jsoniter.Stream) {
|
||||
if stream == nil {
|
||||
return
|
||||
}
|
||||
b := stream.Buffer()
|
||||
hasNil := true
|
||||
if len(b) >= 4 {
|
||||
|
Loading…
Reference in New Issue
Block a user