Skip to content

Commit

Permalink
sock is better than val
Browse files Browse the repository at this point in the history
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
  • Loading branch information
ganmacs committed Jul 24, 2019
1 parent eda267c commit 14985b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/fluent/plugin/out_forward/socket_cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ def checkout_or(key)
if tsock
tsock.sock
else
val = yield
new_tsock = TimedSocket.new(timeout, key, val)
sock = yield
new_tsock = TimedSocket.new(timeout, key, sock)
@log.debug("connect new socket #{new_tsock}")

@inflight_sockets[val] = new_tsock
@inflight_sockets[sock] = new_tsock
new_tsock.sock
end
end
Expand Down

0 comments on commit 14985b3

Please sign in to comment.