Skip to content

Commit 3dfa331

Browse files
authored
fix(server/stdio): risk of concurrent reads and data loss in readNextLine() (#257)
1 parent f8badd6 commit 3dfa331

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/stdio.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,14 @@ func (s *StdioServer) readNextLine(ctx context.Context, reader *bufio.Reader) (s
171171
select {
172172
case errChan <- err:
173173
case <-done:
174-
175174
}
176175
return
177176
}
178177
select {
179178
case readChan <- line:
180179
case <-done:
181180
}
181+
return
182182
}
183183
}()
184184

0 commit comments

Comments
 (0)