Skip to content

Commit 50eae1f

Browse files
committed
added trycatch for ipv4
1 parent 62cd9bb commit 50eae1f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

koboldcpp.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3116,8 +3116,11 @@ def RunServerMultiThreaded(addr, port, server_handler):
31163116
ipv6_sock = context.wrap_socket(ipv6_sock, server_side=True)
31173117

31183118
numThreads = 24
3119-
ipv4_sock.bind((addr, port))
3120-
ipv4_sock.listen(numThreads)
3119+
try:
3120+
ipv4_sock.bind((addr, port))
3121+
ipv4_sock.listen(numThreads)
3122+
except Exception:
3123+
print("IPv4 Socket Failed to Bind.")
31213124

31223125
if ipv6_sock:
31233126
try:

0 commit comments

Comments
 (0)