packer/rpc: ignore non-existent streams in muxconn

This commit is contained in:
Mitchell Hashimoto 2013-12-26 23:34:18 -07:00
parent 437dc12de3
commit 77d0d63b1d
1 changed files with 7 additions and 0 deletions

View File

@ -315,6 +315,13 @@ func (m *MuxConn) loop() {
panic(fmt.Sprintf("Unknown stream direction: %d", from)) 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) //log.Printf("[TRACE] %p: Stream %d (%s) received packet %d", m, id, from, packetType)
switch packetType { switch packetType {
case muxPacketSyn: case muxPacketSyn: