Reworded comment
This commit is contained in:
1 parent
139758256b
commit
6437caddf2
1 file changed
+5
-3
@@ -181,9 +181,11 @@ func (conn *LocalConnection) log(args ...interface{}) {
|
||||
log.Println(append(append([]interface{}{}, fmt.Sprintf("->[%s]:", conn.remote.Name)), args...)...)
|
||||
}
|
||||
|
||||
// Send directly - not via the Actor queryLoop.
|
||||
// note that tcpSender is immutable and guaranteed to be set by the
|
||||
// time anybody can get hold of a ref to the Connection
|
||||
// Send directly, not via the Actor. If it goes via the Actor we can
|
||||
// get a deadlock where LocalConnection is blocked talking to
|
||||
// LocalPeer and LocalPeer is blocked trying send a ProtocolMsg via
|
||||
// LocalConnection, and the channels are full in both directions so
|
||||
// nothing can proceed.
|
||||
func (conn *LocalConnection) SendProtocolMsg(m ProtocolMsg) {
|
||||
if err := conn.sendProtocolMsg(m); err != nil {
|
||||
conn.Shutdown(err)
|
||||
|
||||
Reference in new issue
Block a user