FDio / govpp

Go toolset for the VPP.
Apache License 2.0
199 stars 82 forks source link

Fix endless Stream's reply waiting on vpp disconnect #77

Closed bayrinat closed 2 years ago

bayrinat commented 2 years ago

Draining of underlaying channel makes waiting endless. Now stream uses timeout to prevent it.

Signed-off-by: Rinat Baygildin bayrinat@yandex-team.ru Change-Id: I9a48bf06a2073cb3e6efbeb530c267bd40ec086b

76

bayrinat commented 2 years ago

https://gerrit.fd.io/r/c/govpp/+/36185 - the first attempt to fix it.

Receiving message from Stream is independent from the channel's receiving. That's why we have to use timeout in recvReply as well. Otherwise, we will stuck on receive method while on vpp disconnecting.

bayrinat commented 2 years ago

Gentle ping @ondrej-fabry to verify it.

bayrinat commented 2 years ago

@ondrej-fabry review, plz :)