diff --git a/wandb/sdk/service/server_sock.py b/wandb/sdk/service/server_sock.py
index <HASH>..<HASH> 100644
--- a/wandb/sdk/service/server_sock.py
+++ b/wandb/sdk/service/server_sock.py
@@ -61,9 +61,11 @@ class SockServerInterfaceReaderThread(threading.Thread):
             except queue.Empty:
                 continue
             except OSError:
-                continue
+                # handle is closed
+                break
             except ValueError:
-                continue
+                # queue is closed
+                break
             tracelog.log_message_dequeue(result, self._iface.relay_q)
             sockid = result.control.relay_id
             assert sockid
Fix service performance issue during run shutdown (#<I>)