don't trim line endings in IRCStreamConn

Doesn't help if the line ends with regular \n only,
and the parser has to account for \r and \n anyway
This commit is contained in:
Shivaram Lingamneni 2020-06-23 03:19:08 -04:00
parent 28a0ec86b5
commit 8cadc7340a
1 changed files with 0 additions and 1 deletions

View File

@ -76,7 +76,6 @@ func (cc *IRCStreamConn) ReadLine() (line []byte, err error) {
if isPrefix { if isPrefix {
return nil, errReadQ return nil, errReadQ
} }
line = bytes.TrimSuffix(line, crlf)
if globalUtf8EnforcementSetting && !utf8.Valid(line) { if globalUtf8EnforcementSetting && !utf8.Valid(line) {
err = errInvalidUtf8 err = errInvalidUtf8
} }