Permalink
Browse files

Don't write newlines to the socket

  • Loading branch information...
1 parent 443c328 commit f1b55be488480f904a2bd4ca045c4ac16bac1fa2 @richo committed Mar 23, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/worker.rb
View
@@ -14,10 +14,12 @@ def run
def handle(s)
req = Request.new
id = ::OauthProxy.remember(req)
- s.puts(id)
+ # Writes 128 bytes
+ s.print(id)
# Bind until we're done here- work out how to poll effciently
ret = req.q.deq
- s.puts(ret)
+ # Writes 20 bytes
+ s.print(ret)
ensure
::OauthProxy.forget(id)
s.close

0 comments on commit f1b55be

Please sign in to comment.