Skip to content

Commit

Permalink
Remove non needed test for ErrTooManyConnections in client's readLoop
Browse files Browse the repository at this point in the history
Since we now return an error before setting up the client's readLoop,
testing for this error in readLoop in not needed.
  • Loading branch information
kozlovic committed Dec 1, 2016
1 parent a02ee91 commit fda43ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/client.go
Expand Up @@ -270,7 +270,7 @@ func (c *client) readLoop() {

if err := c.parse(b[:n]); err != nil {
// handled inline
if err != ErrMaxPayload && err != ErrAuthorization && err != ErrTooManyConnections {
if err != ErrMaxPayload && err != ErrAuthorization {
c.Errorf("Error reading from client: %s", err.Error())
c.sendErr("Parser Error")
c.closeConnection()
Expand Down

0 comments on commit fda43ea

Please sign in to comment.