mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-05-06 11:32:59 +00:00
Fix
This commit is contained in:
parent
5e87ea5247
commit
238ac2563b
@ -299,6 +299,9 @@ namespace Esiur.Stores.MongoDB
|
|||||||
|
|
||||||
public bool Put(IResource resource)
|
public bool Put(IResource resource)
|
||||||
{
|
{
|
||||||
|
if (resource == this)
|
||||||
|
return true;
|
||||||
|
|
||||||
PutResource(resource).Wait();
|
PutResource(resource).Wait();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -790,11 +790,13 @@ namespace Esiur.Net.IIP
|
|||||||
if (Instance.Attributes.ContainsKey("username")
|
if (Instance.Attributes.ContainsKey("username")
|
||||||
&& Instance.Attributes.ContainsKey("password"))
|
&& Instance.Attributes.ContainsKey("password"))
|
||||||
{
|
{
|
||||||
var hostname = String.Join("://", Instance.Name.Split(new string[] { "://" }, StringSplitOptions.None).Skip(1)).Split('/')[0];
|
//var hostname = String.Join("://", Instance.Name.Split(new string[] { "://" }, StringSplitOptions.None).Skip(1)).Split('/')[0];
|
||||||
// assign domain from hostname if not provided
|
// assign domain from hostname if not provided
|
||||||
|
|
||||||
var address = hostname.Split(':')[0];
|
var host = Instance.Name.Split(':');
|
||||||
var port = ushort.Parse(hostname.Split(':')[1]);
|
|
||||||
|
var address = host[0];// hostname.Split(':')[0];
|
||||||
|
var port = ushort.Parse(host[1]);// hostname.Split(':')[1]);
|
||||||
var username = Instance.Attributes["username"].ToString();
|
var username = Instance.Attributes["username"].ToString();
|
||||||
|
|
||||||
var domain = Instance.Attributes.ContainsKey("domain") ? Instance.Attributes["domain"].ToString() : address;
|
var domain = Instance.Attributes.ContainsKey("domain") ? Instance.Attributes["domain"].ToString() : address;
|
||||||
|
@ -1153,7 +1153,7 @@ namespace Esiur.Net.IIP
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
SendError(ErrorType.Exception, callback, 0, ex.ToString());
|
SendError(ErrorType.Exception, callback, 0, ex.InnerException.ToString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,7 +294,14 @@ namespace Esiur.Net
|
|||||||
|
|
||||||
c.Assign(sock);
|
c.Assign(sock);
|
||||||
|
|
||||||
ClientConnected(c);
|
try
|
||||||
|
{
|
||||||
|
ClientConnected(c);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// something wrong with the child.
|
||||||
|
}
|
||||||
|
|
||||||
// Accept more
|
// Accept more
|
||||||
listener.Accept().Then(NewConnection);
|
listener.Accept().Then(NewConnection);
|
||||||
|
@ -426,8 +426,8 @@ namespace Esiur.Resource
|
|||||||
|
|
||||||
if (resource is IStore)
|
if (resource is IStore)
|
||||||
StoreConnected?.Invoke(resource as IStore, name);
|
StoreConnected?.Invoke(resource as IStore, name);
|
||||||
else
|
//else
|
||||||
store.Put(resource);
|
store.Put(resource);
|
||||||
|
|
||||||
|
|
||||||
if (parent != null)
|
if (parent != null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user