From 11beb3a82270293ea49321ae7cafd01cd843543c Mon Sep 17 00:00:00 2001 From: swee Date: Mon, 13 Jan 2025 16:37:23 -0800 Subject: [PATCH] Update server.py --- server.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/server.py b/server.py index 001e71c..a9692cd 100644 --- a/server.py +++ b/server.py @@ -51,10 +51,13 @@ def relay(): received = "" while True: gemresponse = gemsocket.recv(2048) - if gemresponse.decode() != "": - received += gemresponse.decode() - else: - break + try: + if gemresponse.decode() != "": + received += gemresponse.decode() + else: + break + except: + return f'\nSomething went wrong...

Something went wrong...

The file that the Gemini server sent couldn\' be decoded by Gem2Browser.

' received = received.replace("\r", "") firstline = True redirected = False