Commit 54b3ccc8 authored by Aaron Jacobs's avatar Aaron Jacobs

commonOp.respond

parent 06b6ec27
......@@ -218,9 +218,6 @@ func (o *commonOp) respondErr(err error) {
//
// Special case: nil means o.bazilReq.Respond accepts no parameters.
func (o *commonOp) respond(resp interface{}) {
// We were successful.
o.report(nil)
// Find the Respond method.
v := reflect.ValueOf(o.bazilReq)
respond := v.MethodByName("Respond")
......@@ -232,7 +229,10 @@ func (o *commonOp) respond(resp interface{}) {
return
}
// Otherwise, pass along the response struct.
// Otherwise, send the response struct to the kernel.
o.Logf("-> %v", resp)
respond.Call([]reflect.Value{reflect.ValueOf(resp)})
// Report back to the connection that we are finished.
o.finish(nil)
}
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