From 77d0d63b1d607f6c2f2bc70187b2b694d6ff2a6a Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 26 Dec 2013 23:34:18 -0700 Subject: [PATCH] packer/rpc: ignore non-existent streams in muxconn --- packer/rpc/muxconn.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packer/rpc/muxconn.go b/packer/rpc/muxconn.go index 206208033..434ebdea8 100644 --- a/packer/rpc/muxconn.go +++ b/packer/rpc/muxconn.go @@ -315,6 +315,13 @@ func (m *MuxConn) loop() { panic(fmt.Sprintf("Unknown stream direction: %d", from)) } + if stream == nil && packetType != muxPacketSyn { + log.Printf( + "[WARN] %p: Non-existent stream %d (%s) received packer %d", + m, id, from, packetType) + continue + } + //log.Printf("[TRACE] %p: Stream %d (%s) received packet %d", m, id, from, packetType) switch packetType { case muxPacketSyn: