- use null conditional access in case some connections been
  cancelled unexpectedly and may cause null reference exception
- Refine error message
- use conditional operator to simplify some code

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
This commit is contained in:
Syrone Wong
2016-08-10 15:27:38 +08:00
parent a4fead74db
commit a9af9fdfc0
9 changed files with 48 additions and 45 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ namespace Shadowsocks
if (Interlocked.Increment(ref exited) == 1)
{
Logging.Error(e.ExceptionObject?.ToString());
MessageBox.Show(I18N.GetString("Unexpect error, shadowsocks will be exit. Please report to") +
MessageBox.Show(I18N.GetString("Unexpected error, shadowsocks will exit. Please report to") +
" https://github.com/shadowsocks/shadowsocks-windows/issues " +
Environment.NewLine + (e.ExceptionObject?.ToString()),
"Shadowsocks Error", MessageBoxButtons.OK, MessageBoxIcon.Error);