Skip to content

Commit

Permalink
need to account for extra two bytes \r\n when reading response with r…
Browse files Browse the repository at this point in the history
…ead-string

git-svn-id: https://code.call-cc.org/svn/chicken-eggs/release/4/hen/trunk@26205 fca3e652-9b03-0410-8d7b-ac86a6ce46c4
  • Loading branch information
joseph.gay committed Mar 18, 2012
1 parent 9107814 commit f6a21c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hen.scm
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@
...)]))

(define (read-stats res tcp-in #!optional (parser parse-yaml-alist))
(if* (second-match "^OK (\\d+)$" res) (parser (read-string (string->number it) tcp-in))))
(if* (second-match "^OK (\\d+)$" res)
(parser (string-trim-last (read-string (+ 2 (string->number it)) tcp-in)))
res))

(define-hen-command-list
[use (tube)]
Expand Down

0 comments on commit f6a21c4

Please sign in to comment.