Browse Source

command/agent: block windows socket errors

pull/161/head
Mitchell Hashimoto 11 years ago
parent
commit
bae3c1606c
  1. 2
      CHANGELOG.md
  2. 7
      command/agent/rpc.go

2
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)

7
command/agent/rpc.go

@ -295,9 +295,14 @@ func (i *AgentRPC) handleClient(client *rpcClient) {
for {
// Decode the header
if err := client.dec.Decode(&reqHeader); err != nil {
if err != io.EOF && !i.stop {
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
}

Loading…
Cancel
Save