diff --git a/CHANGELOG.md b/CHANGELOG.md index d49e01ce9d..92a670b4d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ BUG FIXES: * Renaming "seperator" to "separator". This is the correct spelling, but both spellings are respected for backwards compatibility. [GH-101] * Private IP is properly found on Windows clients. + * Windows agents won't show "failed to decode" errors on every RPC + request. ## 0.2.0 (May 1, 2014) diff --git a/command/agent/rpc.go b/command/agent/rpc.go index 99ca9479a2..e56196f518 100644 --- a/command/agent/rpc.go +++ b/command/agent/rpc.go @@ -295,8 +295,13 @@ func (i *AgentRPC) handleClient(client *rpcClient) { for { // Decode the header if err := client.dec.Decode(&reqHeader); err != nil { - if err != io.EOF && !i.stop { - i.logger.Printf("[ERR] agent.rpc: failed to decode request header: %v", err) + if !i.stop { + // The second part of this if is to block socket + // errors from Windows which appear to happen every + // time there is an EOF. + if err != io.EOF && !strings.Contains(err.Error(), "WSARecv") { + i.logger.Printf("[ERR] agent.rpc: failed to decode request header: %v", err) + } } return }