response = connection.recv(4096).decode('utf-8')
if not '</stream:features>' in response:
- response = response + connection.recv(4096).decode('utf-8')
+ connection.recv(4096)
connection.sendall(xmpp_starttls.encode('utf-8'))
- response = response + "\n\n" + connection.recv(4096).decode('utf-8')
+ connection.recv(4096)
connection = context.wrap_socket(connection, server_hostname=name)
connection.do_handshake()