Skip to content

Commit

Permalink
(tcp) fix shutdown if there are pending writes
Browse files Browse the repository at this point in the history
previously this would cause an error as as finally was being called on
a deferrable not the promise
  • Loading branch information
Stephen von Takach committed Nov 19, 2017
1 parent 9b6f281 commit 516b657
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libuv/tcp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def write(data, wait: false)
alias_method :do_shutdown, :shutdown
def shutdown
if @pending_writes && @pending_writes.length > 0
@pending_writes[-1][0].finally { do_shutdown }
@pending_writes[-1][0].promise.finally { do_shutdown }
else
do_shutdown
end
Expand Down

0 comments on commit 516b657

Please sign in to comment.