Commit 64cb9b6f authored by Rob Pike's avatar Rob Pike

rpc: fix bug that caused private methods to attempt to be registered.

Fixes #1056.

R=golang-dev, adg1
CC=golang-dev
https://golang.org/cl/2033043
parent 089ce170
......@@ -211,7 +211,7 @@ func (server *serverType) register(rcvr interface{}) os.Error {
method := s.typ.Method(m)
mtype := method.Type
mname := method.Name
if mtype.PkgPath() != "" && !isPublic(mname) {
if mtype.PkgPath() != "" || !isPublic(mname) {
continue
}
// Method needs three ins: receiver, *args, *reply.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment