From 04486094f786e2ae3fc5802715709b5aa2fdf0bc Mon Sep 17 00:00:00 2001 From: kimw Date: Tue, 5 Jan 2016 03:26:55 +0800 Subject: [PATCH] fixed compile errors in Release mode --- shadowsocks-csharp/Controller/Logging.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shadowsocks-csharp/Controller/Logging.cs b/shadowsocks-csharp/Controller/Logging.cs index edf84144..38201660 100755 --- a/shadowsocks-csharp/Controller/Logging.cs +++ b/shadowsocks-csharp/Controller/Logging.cs @@ -48,9 +48,9 @@ namespace Shadowsocks.Controller #endif } -#if DEBUG public static void Debug(EndPoint local, EndPoint remote, int len, string header = null, string tailer = null) { +#if DEBUG if (header == null && tailer == null) Debug($"{local} => {remote} (size={len})"); else if (header == null && tailer != null) @@ -59,13 +59,15 @@ namespace Shadowsocks.Controller Debug($"{header}: {local} => {remote} (size={len})"); else Debug($"{header}: {local} => {remote} (size={len}), {tailer}"); +#endif } public static void Debug(Socket sock, int len, string header = null, string tailer = null) { +#if DEBUG Debug(sock.LocalEndPoint, sock.RemoteEndPoint, len, header, tailer); - } #endif + } public static void LogUsefulException(Exception e) {