Skip to content

Commit

Permalink
Revert "Extend the timeouts in verifySendingMsg"
Browse files Browse the repository at this point in the history
This reverts commit 663859e.
  • Loading branch information
michalbiesek committed Jul 11, 2023
1 parent f886c73 commit bd1aa1b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cli/ipc/ipc.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ var (

const ipcComTimeout time.Duration = 50 * time.Microsecond
const comRetryLimit int = 50
const ipcConsumeTimeout time.Duration = 500 * time.Microsecond
const consumeRetryLimit int = 500

type IpcPidCtx struct {
Pid int
Expand Down Expand Up @@ -223,13 +221,13 @@ func (ipc *ipcObj) send(msg []byte) error {
// verifies if message was consumed by the application
func (ipc *ipcObj) verifySendingMsg() error {
// Ensure that message was consumed by the library
for i := 0; i < consumeRetryLimit; i++ {
for i := 0; i < comRetryLimit; i++ {
curMsg, err := ipc.sender.size()
if err != nil {
return err
}
if curMsg != 0 {
time.Sleep(ipcConsumeTimeout)
time.Sleep(ipcComTimeout)
} else {
return nil
}
Expand Down

0 comments on commit bd1aa1b

Please sign in to comment.