protected virtual bool TryClose() {
if (Client == null)
return true;
lock (_closedLock) {
if (Closed)
return true;
Closed = true;
}
try {
Client.Close();
return true;
} catch (Exception e) {
this.Logger().FormattedWarnException(e);
}
return false;
}
}