Compare commits
No commits in common. "9ebe7933cbdd7ccd8a26df9a7c7441be4e1f0dab" and "49c58c94da93d6a253b4f4a1df197bc0a99ce916" have entirely different histories.
9ebe7933cb
...
49c58c94da
2 changed files with 7 additions and 4 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
import datetime
|
||||||
|
|
||||||
from xenu_nntp.db import DatabaseTable
|
from xenu_nntp.db import DatabaseTable
|
||||||
|
|
||||||
class Newsgroup(DatabaseTable):
|
class Newsgroup(DatabaseTable):
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import re
|
import re
|
||||||
|
import enum
|
||||||
import threading
|
import threading
|
||||||
import socket
|
import socket
|
||||||
import selectors
|
import selectors
|
||||||
|
@ -37,7 +38,7 @@ class Server():
|
||||||
|
|
||||||
try:
|
try:
|
||||||
sock, addr = listener.accept()
|
sock, addr = listener.accept()
|
||||||
except ssl.SSLError:
|
except ssl.SSLError as e:
|
||||||
return
|
return
|
||||||
|
|
||||||
def spawn():
|
def spawn():
|
||||||
|
@ -45,12 +46,12 @@ class Server():
|
||||||
|
|
||||||
try:
|
try:
|
||||||
session.handle()
|
session.handle()
|
||||||
|
|
||||||
thread = threading.Thread(target=spawn)
|
|
||||||
thread.start()
|
|
||||||
except (ssl.SSLEOFError, ssl.SSLError):
|
except (ssl.SSLEOFError, ssl.SSLError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
thread = threading.Thread(target=spawn)
|
||||||
|
thread.start()
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
hosts = re.split(r'\s*,\s*', self.config.get('listen', 'host'))
|
hosts = re.split(r'\s*,\s*', self.config.get('listen', 'host'))
|
||||||
port = int(self.config.get('listen', 'port'))
|
port = int(self.config.get('listen', 'port'))
|
||||||
|
|
Loading…
Add table
Reference in a new issue