dont fail empty payload
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
8edc1817cb
commit
511a0dfcec
6
xml.go
6
xml.go
@ -54,7 +54,11 @@ func (c *xmlCodec) ReadBody(conn io.Reader, b interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
return xml.NewDecoder(conn).Decode(b)
|
||||
err := xml.NewDecoder(conn).Decode(b)
|
||||
if err == io.EOF {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *xmlCodec) Write(conn io.Writer, m *codec.Message, b interface{}) error {
|
||||
|
Loading…
Reference in New Issue
Block a user