Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dead lock or lost message when ovs is unstable #16

Open
1071496910 opened this issue Jul 10, 2020 · 1 comment
Open

dead lock or lost message when ovs is unstable #16

1071496910 opened this issue Jul 10, 2020 · 1 comment

Comments

@1071496910
Copy link

1071496910 commented Jul 10, 2020

this function will lost message or make block if the connection of ovs is closing.

// Listen for a Shutdown signal or Outbound messages.
func (m *MessageStream) outbound() {
for {
select {
case <-m.Shutdown:
log.Infof("Closing OpenFlow message stream.")
m.conn.Close()
for i := 0; i < numParserGoroutines; i++ {
m.parserShutdown <- true
}
return
case msg := <-m.Outbound:
// Forward outbound messages to conn
data, _ := msg.MarshalBinary()
if _, err := m.conn.Write(data); err != nil {
log.Warnln("OutboundError:", err)
m.Error <- err
m.Shutdown <- true
}
log.Debugf("Sent(%d): %v", len(data), data)
}
}
}

@jesson1
Copy link

jesson1 commented Apr 25, 2024

dead lock for m.Shutdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants