Navigation Menu

Skip to content

Commit

Permalink
Output more trace logs
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 28, 2015
1 parent b4503c5 commit 25bb6bb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/droonga/buffered_tcp_socket.rb
Expand Up @@ -47,11 +47,16 @@ def on_writable
until @_write_buffer.empty?
chunk = @_write_buffer.shift
begin
logger.trace("Sending...", :data => chunk.data)
written_size = @_io.write_nonblock(chunk.data)
if written_size == chunk.data.bytesize
chunk.written
logger.trace("Completely sent.")
else
chunk.written_partial(written_size)
logger.trace("Partially sent. Retry later.",
:written => written_size,
:rest => chunk.data.bytesize)
@_write_buffer.unshift(chunk)
break
end
Expand Down

0 comments on commit 25bb6bb

Please sign in to comment.