mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-25 15:42:57 +08:00
Expose more properties of the connection validator context in MQTTnet.Server. Migrate return code to reason code.
This commit is contained in:
@@ -35,7 +35,7 @@ namespace MQTTnet.Server.Mqtt
|
||||
return;
|
||||
}
|
||||
|
||||
_path = ExpandPath();
|
||||
_path = PathHelper.ExpandPath(_mqttSettings.RetainedApplicationMessages.Path);
|
||||
|
||||
// The retained application messages are stored in a separate thread.
|
||||
// This is mandatory because writing them to a slow storage (like RaspberryPi SD card)
|
||||
@@ -115,18 +115,5 @@ namespace MQTTnet.Server.Mqtt
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private string ExpandPath()
|
||||
{
|
||||
var path = _mqttSettings.RetainedApplicationMessages.Path;
|
||||
|
||||
var uri = new Uri(path, UriKind.RelativeOrAbsolute);
|
||||
if (!uri.IsAbsoluteUri)
|
||||
{
|
||||
path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, path);
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user