[Modify] Polish it

This commit is contained in:
sta 2020-09-23 20:34:51 +09:00
parent 8e9cb4ffd5
commit 71fa2da4b9

View File

@ -153,12 +153,18 @@ namespace WebSocketSharp.Net
#region Private Methods #region Private Methods
private static void addSpecial (List<HttpListenerPrefix> prefixes, HttpListenerPrefix prefix) private static void addSpecial (
List<HttpListenerPrefix> prefixes, HttpListenerPrefix prefix
)
{ {
var path = prefix.Path; var path = prefix.Path;
foreach (var pref in prefixes) { foreach (var pref in prefixes) {
if (pref.Path == path) if (pref.Path == path) {
throw new HttpListenerException (87, "The prefix is already in use."); var msg = "The prefix is already in use.";
throw new HttpListenerException (87, msg);
}
} }
prefixes.Add (prefix); prefixes.Add (prefix);