From e1e7dd0627d63313caf7858c37cb0773fc4e831a Mon Sep 17 00:00:00 2001 From: Andrew Lalis Date: Fri, 27 Sep 2024 11:19:14 -0400 Subject: [PATCH] Update source/handy_httpd/components/websocket/manager.d --- source/handy_httpd/components/websocket/manager.d | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/handy_httpd/components/websocket/manager.d b/source/handy_httpd/components/websocket/manager.d index 34e3a89..b01a5c4 100644 --- a/source/handy_httpd/components/websocket/manager.d +++ b/source/handy_httpd/components/websocket/manager.d @@ -199,13 +199,11 @@ class WebSocketManager : Thread { conn.id, (){ import std.socket : SocketOSException; - string address = "unkown"; try { - address = conn.getSocket().remoteAddress().toString; + return conn.getSocket().remoteAddress().toString; + } catch(SocketOSException e) { + return "unknown"; } - catch(SocketOSException e) { - } - return address; }(), frame.opcode, frame.payload.length