Tighten exceptions for new sockets and reads
[mudpy.git] / lib / mudpy / misc.py
index ed48769..7e8e612 100644 (file)
@@ -907,7 +907,7 @@ class User:
         # check for some input
         try:
             raw_input = self.connection.recv(1024)
-        except:
+        except (BlockingIOError, OSError):
             raw_input = b""
 
         # we got something
@@ -1489,7 +1489,7 @@ def check_for_connection(listening_socket):
     # try to accept a new connection
     try:
         connection, address = listening_socket.accept()
-    except:
+    except BlockingIOError:
         return None
 
     # note that we got one