Browse Source

don't shadow the second error

tags/v0.1.0
Edmund Huber 9 years ago
parent
commit
a16cc84e41
1 changed files with 4 additions and 3 deletions
  1. 4
    3
      irc/websocket.go

+ 4
- 3
irc/websocket.go View File

40
 }
40
 }
41
 
41
 
42
 func (this WSContainer) SetDeadline(t time.Time) error {
42
 func (this WSContainer) SetDeadline(t time.Time) error {
43
-	err := this.SetWriteDeadline(t)
44
-	err = this.SetReadDeadline(t)
45
-	return err
43
+	if err := this.SetWriteDeadline(t); err != nil {
44
+		return err
45
+	}
46
+	return this.SetReadDeadline(t)
46
 }
47
 }

Loading…
Cancel
Save