mirror of https://github.com/status-im/consul.git
command/agent: block windows socket errors
This commit is contained in:
parent
78b7c57ba3
commit
bae3c1606c
|
@ -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)
|
||||
|
||||
|
|
|
@ -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…
Reference in New Issue