Skip to content

Commit

Permalink
Merge pull request #1153 from JoseFeng/master
Browse files Browse the repository at this point in the history
nsqd: close connections that don't send magic
  • Loading branch information
jehiah authored Mar 26, 2019
2 parents e788b6b + 5a730ec commit 223e97f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nsqd/tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ func (p *tcpServer) Handle(clientConn net.Conn) {
_, err := io.ReadFull(clientConn, buf)
if err != nil {
p.ctx.nsqd.logf(LOG_ERROR, "failed to read protocol version - %s", err)
clientConn.Close()
return
}
protocolMagic := string(buf)
Expand Down

0 comments on commit 223e97f

Please sign in to comment.