Skip to content

Calling net.Record.PrevID() crashes when the client is closing #517

@merlinran

Description

@merlinran

Same for other methods I believe. Caught this because I mistakenly closed the client while processing records in another goroutine.

Error getting record: rpc error: code = Unavailable desc = transport is closing
...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x1fe57cd]
...

It isn't necessarily a bug, but it would be better if the panic reveals the root problem more apparently. For example, we could have a null object which panics more soundly before the record is loaded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions