Commit 77aefe15 authored by Sébastien's avatar Sébastien
Browse files

boucle while

parent 84673721
...@@ -6,7 +6,8 @@ After=syslog.target network.target ...@@ -6,7 +6,8 @@ After=syslog.target network.target
Type=simple Type=simple
User=osinfo User=osinfo
Group=osinfo Group=osinfo
ExecStart=/usr/bin/python3.7 /opt/osinfo/server.py ExecStart=/usr/bin/python3.8 /opt/osinfo/server.py
pipenv run python ./server.py
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
......
...@@ -56,8 +56,7 @@ def main(host="0.0.0.0", port=7777): ...@@ -56,8 +56,7 @@ def main(host="0.0.0.0", port=7777):
mySocket.bind((host,port)) mySocket.bind((host,port))
mySocket.listen(1) mySocket.listen(1)
# while True: while True:
for i in range(3):
conn, addr = mySocket.accept() conn, addr = mySocket.accept()
LOG.debug("connection from: " + str(addr)) LOG.debug("connection from: " + str(addr))
data = conn.recv(1024).decode() data = conn.recv(1024).decode()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment