2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-05-06 11:32:59 +00:00
This commit is contained in:
Ahmed Zamil 2019-11-11 12:50:10 +03:00
parent 5e87ea5247
commit 238ac2563b
5 changed files with 19 additions and 7 deletions

View File

@ -299,6 +299,9 @@ namespace Esiur.Stores.MongoDB
public bool Put(IResource resource)
{
if (resource == this)
return true;
PutResource(resource).Wait();
return true;

View File

@ -790,11 +790,13 @@ namespace Esiur.Net.IIP
if (Instance.Attributes.ContainsKey("username")
&& 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
var address = hostname.Split(':')[0];
var port = ushort.Parse(hostname.Split(':')[1]);
var host = Instance.Name.Split(':');
var address = host[0];// hostname.Split(':')[0];
var port = ushort.Parse(host[1]);// hostname.Split(':')[1]);
var username = Instance.Attributes["username"].ToString();
var domain = Instance.Attributes.ContainsKey("domain") ? Instance.Attributes["domain"].ToString() : address;

View File

@ -1153,7 +1153,7 @@ namespace Esiur.Net.IIP
}
catch (Exception ex)
{
SendError(ErrorType.Exception, callback, 0, ex.ToString());
SendError(ErrorType.Exception, callback, 0, ex.InnerException.ToString());
return;
}

View File

@ -294,7 +294,14 @@ namespace Esiur.Net
c.Assign(sock);
ClientConnected(c);
try
{
ClientConnected(c);
}
catch
{
// something wrong with the child.
}
// Accept more
listener.Accept().Then(NewConnection);

View File

@ -426,8 +426,8 @@ namespace Esiur.Resource
if (resource is IStore)
StoreConnected?.Invoke(resource as IStore, name);
else
store.Put(resource);
//else
store.Put(resource);
if (parent != null)