mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-13 23:24:45 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee54862be2 |
@@ -175,10 +175,12 @@ func (slf *HttpSession) Write(msg []byte) {
|
|||||||
|
|
||||||
func (slf *HttpSession) WriteJsonDone(statusCode int,msgJson interface{}) error {
|
func (slf *HttpSession) WriteJsonDone(statusCode int,msgJson interface{}) error {
|
||||||
msg, err := json.Marshal(msgJson)
|
msg, err := json.Marshal(msgJson)
|
||||||
if err == nil {
|
if err != nil {
|
||||||
slf.Write(msg)
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
slf.statusCode = statusCode
|
||||||
|
slf.Write(msg)
|
||||||
slf.Done()
|
slf.Done()
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user