Skip to content

Commit

Permalink
clear self.std* to avoid writing to empty pipes
Browse files Browse the repository at this point in the history
This ensures that behavior between a newly opened nvim and one in which tabnine-chat has been opened and then closed are identical
  • Loading branch information
aarondill committed Jul 7, 2023
1 parent 6c8d293 commit cc10a17
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/tabnine/chat/binary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ function ChatBinary:close()
uv.kill(self.pid, "sigterm")
self.handle = nil
self.pid = nil
self.stdin = nil

This comment has been minimized.

Copy link
@amirbilu

amirbilu Jul 7, 2023

done. by the way we need to apply same logic for Tabnine binary

This comment has been minimized.

Copy link
@aarondill

aarondill Jul 7, 2023

Author Owner

@amirbilu, yes. This could likely be reasonably added in #82.

self.stdout = nil
self.stderr = nil
end
end

Expand Down

0 comments on commit cc10a17

Please sign in to comment.