From 311fb2064d7043c7b00f37607ff9fcb01cd5c861 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 11 Dec 2013 17:14:01 -0800 Subject: [PATCH] packer/rpc: can write while MuxConn is in CloseWait state --- packer/rpc/muxconn.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer/rpc/muxconn.go b/packer/rpc/muxconn.go index 93387587e..d2ec5f6b2 100644 --- a/packer/rpc/muxconn.go +++ b/packer/rpc/muxconn.go @@ -430,7 +430,7 @@ func (s *Stream) Write(p []byte) (int, error) { state := s.state s.mu.Unlock() - if state != streamStateEstablished { + if state != streamStateEstablished && state != streamStateCloseWait { return 0, fmt.Errorf("Stream %d in bad state to send: %d", s.id, state) }