aboutsummaryrefslogtreecommitdiffstats
path: root/peer.go
diff options
context:
space:
mode:
Diffstat (limited to 'peer.go')
-rw-r--r--peer.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/peer.go b/peer.go
index 932dbdc18..70759f246 100644
--- a/peer.go
+++ b/peer.go
@@ -187,6 +187,10 @@ func NewOutboundPeer(addr string, ethereum *Ethereum, caps Caps) *Peer {
// Outputs any RLP encoded data to the peer
func (p *Peer) QueueMessage(msg *ethwire.Msg) {
+ if atomic.LoadInt32(&p.connected) != 1 {
+ return
+ }
+
p.outputQueue <- msg
}