3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

don't shadow the second error

This commit is contained in:
Edmund Huber 2015-06-06 16:15:09 -07:00
parent fce54343ea
commit a16cc84e41

View File

@ -40,7 +40,8 @@ func (this WSContainer) Write(msg []byte) (int, error) {
}
func (this WSContainer) SetDeadline(t time.Time) error {
err := this.SetWriteDeadline(t)
err = this.SetReadDeadline(t)
return err
if err := this.SetWriteDeadline(t); err != nil {
return err
}
return this.SetReadDeadline(t)
}