fix newline handling logic
Merge pull request #14 from rhenium/fix_stalling

fix newline handling logic

update response timestamps when receiving empty responses