We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 840879b commit cb23bd1Copy full SHA for cb23bd1
client/transport/stdio.go
@@ -200,11 +200,15 @@ func (c *Stdio) Close() error {
200
// cancel all in-flight request
201
close(c.done)
202
203
- if err := c.stdin.Close(); err != nil {
204
- return fmt.Errorf("failed to close stdin: %w", err)
+ if c.stdin != nil {
+ if err := c.stdin.Close(); err != nil {
205
+ return fmt.Errorf("failed to close stdin: %w", err)
206
+ }
207
}
- if err := c.stderr.Close(); err != nil {
- return fmt.Errorf("failed to close stderr: %w", err)
208
+ if c.stderr != nil {
209
+ if err := c.stderr.Close(); err != nil {
210
+ return fmt.Errorf("failed to close stderr: %w", err)
211
212
213
214
if c.cmd != nil {
0 commit comments