aboutsummaryrefslogtreecommitdiff
path: root/conn.go
diff options
context:
space:
mode:
Diffstat (limited to 'conn.go')
-rw-r--r--conn.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/conn.go b/conn.go
index 1cd8492..c84fc5d 100644
--- a/conn.go
+++ b/conn.go
@@ -24,6 +24,9 @@ func (c *Conn) ReadMessage() (msg Message, line string, err error) {
return
}
+ if raw[len(raw) - 1] == '\n' {
+ raw = raw[:len(raw) - 1]
+ }
if raw[len(raw) - 1] == '\r' {
raw = raw[:len(raw) - 1]
}