multiformats / go-multistream

an implementation of the multistream protocol in go
MIT License
40 stars 27 forks source link

race condition in NegotiateLazy #83

Closed marten-seemann closed 1 year ago

marten-seemann commented 2 years ago

Race condition in NegotiateLazy: If one protocol is unsupported, we need to send an "na". However, we try to do this concurrently with parsing of the next token. If parsing of the next token errored, we'd close the connection, leading to the "na" being written on a closed connection.

marten-seemann commented 1 year ago

NegotiateLazy was removed in #92.