diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-07-28 12:49:14 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-07-28 13:01:27 +0300 |
commit | 28ddadc41d41fbcd41948a412377471b374b677b (patch) | |
tree | faa7cf5af03a0924319a20d949b15923b98f89fd /share | |
parent | 54b8f9cc65f6d440ee57725fa95b297e65e5a9cc (diff) | |
download | subplot-28ddadc41d41fbcd41948a412377471b374b677b.tar.gz |
fix: use socket/bind/listen for compa with Python < 3.8
Sponsored-by: author
Diffstat (limited to 'share')
-rw-r--r-- | share/python/lib/daemon.md | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/share/python/lib/daemon.md b/share/python/lib/daemon.md index 2a9a2e0..c4f5e27 100644 --- a/share/python/lib/daemon.md +++ b/share/python/lib/daemon.md @@ -51,7 +51,10 @@ import time time.sleep(2) -s = socket.create_server(("", 8888)) +s = socket.socket() +s.bind(("127.0.0.1", 8888)) +s.listen() + (conn, _) = s.accept() conn.recv(1) s.close() |