mirror of https://github.com/fail2ban/fail2ban
parent
1ebea39ec5
commit
4aff396b05
|
@ -65,14 +65,16 @@ class RequestHandler(asynchat.async_chat):
|
||||||
|
|
||||||
def found_terminator(self):
|
def found_terminator(self):
|
||||||
# Pop whole buffer
|
# Pop whole buffer
|
||||||
buf = self.__buffer
|
message = self.__buffer
|
||||||
self.__buffer = []
|
self.__buffer = []
|
||||||
# Joins the buffer items.
|
# Joins the buffer items.
|
||||||
message = loads(CSPROTO.EMPTY.join(buf))
|
message = CSPROTO.EMPTY.join(message)
|
||||||
# Closes the channel if close was received
|
# Closes the channel if close was received
|
||||||
if message == CSPROTO.CLOSE:
|
if message == CSPROTO.CLOSE:
|
||||||
self.close_when_done()
|
self.close_when_done()
|
||||||
return
|
return
|
||||||
|
# Deserialize
|
||||||
|
message = loads(message)
|
||||||
# Gives the message to the transmitter.
|
# Gives the message to the transmitter.
|
||||||
message = self.__transmitter.proceed(message)
|
message = self.__transmitter.proceed(message)
|
||||||
# Serializes the response.
|
# Serializes the response.
|
||||||
|
|
Loading…
Reference in New Issue