Skip to content

rpcErr is always nil in defer #44

Closed
@siddontang

Description

I see the code in raft.go

var rpcErr error
defer rpc.Respond(resp, rpcErr)

and you will assign an error to rpcErr later, but this doesn't work.

A simple example http://play.golang.org/p/IYSUpouNhs

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