commonOp.respond

geesefs-0-30-9
Aaron Jacobs 2015-05-05 09:58:18 +10:00
parent 06b6ec27f5
commit 54b3ccc86a
1 changed files with 4 additions and 4 deletions

View File

@ -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)
}