FDio / govpp

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

Function WaitReady does not wait if socket dir does not exist #81

Closed mhalaj1 closed 1 year ago

mhalaj1 commented 1 year ago

Description: The function WaitReady (https://github.com/FDio/govpp/blob/master/adapter/socketclient/socketclient.go#L141) should wait until socket exists. If the directory for the socket already exists, it works correctly. But if the directory does not exist, it throws error and does not wait. How to reproduce: Make sure that VPP is not running and the directory /run/vpp does not exist. If it exists, delete it. Then run the example examples/simple_client.go. Observed behaviour: GoVPP waits 0.5 seconds between reconnects (reconnect interval). Expected behaviour: It should wait 10.5 seconds between reconnects (variable MaxWaitReady + reconnect interval).