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...)...)
|
log.Println(append(append([]interface{}{}, fmt.Sprintf("->[%s]:", conn.remote.Name)), args...)...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send directly - not via the Actor queryLoop.
|
// Send directly, not via the Actor. If it goes via the Actor we can
|
||||||
// note that tcpSender is immutable and guaranteed to be set by the
|
// get a deadlock where LocalConnection is blocked talking to
|
||||||
// time anybody can get hold of a ref to the Connection
|
// 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) {
|
func (conn *LocalConnection) SendProtocolMsg(m ProtocolMsg) {
|
||||||
if err := conn.sendProtocolMsg(m); err != nil {
|
if err := conn.sendProtocolMsg(m); err != nil {
|
||||||
conn.Shutdown(err)
|
conn.Shutdown(err)
|
||||||
|
|||||||
Reference in new issue
Block a user