Don't log clients that don't send any request

They just fill up the logs with confusing data.
This commit is contained in:
Pierre Ossman 2017-10-27 08:25:35 +02:00
parent abcf2cd4d4
commit 0a6e0c2d87
1 changed files with 2 additions and 2 deletions

View File

@ -520,14 +520,14 @@ class WebSockifyServer(object):
if not ready:
raise self.EClose("ignoring socket not ready")
raise self.EClose("")
# Peek, but do not read the data so that we have a opportunity
# to SSL wrap the socket first
handshake = sock.recv(1024, socket.MSG_PEEK)
#self.msg("Handshake [%s]" % handshake)
if not handshake:
raise self.EClose("ignoring empty handshake")
raise self.EClose("")
elif handshake[0] in ("\x16", "\x80", 22, 128):
# SSL wrap the connection