Skip to content

Commit

Permalink
Merge pull request #116 from psharpNumerex/dev
Browse files Browse the repository at this point in the history
Strip possible newline from beginning of frame
  • Loading branch information
gmallard committed Dec 22, 2015
2 parents dc6d655 + 88451a7 commit d40eea1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/connection/netio.rb
Expand Up @@ -31,6 +31,8 @@ def _receive(read_socket, connread = false)
end
#
return nil if line.nil?
#An extra \n at the beginning of the frame, possibly not caught by is_ready?
line = '' if line == "\n"
# p [ "wiredatain_01", line ]
line = _normalize_line_end(line) if @protocol >= Stomp::SPL_12
# If the reading hangs for more than X seconds, abort the parsing process.
Expand Down

0 comments on commit d40eea1

Please sign in to comment.