Exception handling while starting followers thread

main
Bob Mottram 2020-06-23 15:48:10 +01:00
parent afd412118d
commit d94c04b5bb
1 changed files with 10 additions and 1 deletions

View File

@ -2167,7 +2167,16 @@ def sendToFollowersThread(session, baseDir: str,
cachedWebfingers, personCache,
postJsonObject.copy(), debug,
projectVersion), daemon=True)
try:
sendThread.start()
except SocketError as e:
print('WARN: socket error while starting ' +
'thread to send to followers. ' + str(e))
return None
except BaseException:
print('WARN: error while starting ' +
'thread to send to followers. ' + str(e))
return None
return sendThread