|
@@ -47,9 +47,18 @@ namespace PRS.Mobile
|
|
|
|
|
|
Transport = transport;
|
|
|
ClientFactory.SetClientType(typeof(RpcClient<>), InABox.Core.Platform.TimeBench, MobileUtils.AppVersion.InstalledVersionNumber + App.DeviceString, Transport);
|
|
|
+
|
|
|
+ // Workaround for bug in RPCSocketServer where lrge uploads (ie photos)
|
|
|
+ // actually crash the server. So to get something working, we'll
|
|
|
+ // fall back to a Rest Client while still maintaining the RPC Transport stuff
|
|
|
var info = new Client<User>().Info();
|
|
|
- var resturl = $"{transport.ServerName()}:{info.RestPort}";
|
|
|
- ClientFactory.SetClientType(typeof(RestClient<>), InABox.Core.Platform.TimeBench, MobileUtils.AppVersion.InstalledVersionNumber + App.DeviceString, resturl);
|
|
|
+ if (info.RestPort != 0)
|
|
|
+ {
|
|
|
+ var resturl = $"{transport.ServerName()}:{info.RestPort}";
|
|
|
+ ClientFactory.SetClientType(typeof(RestClient<>), InABox.Core.Platform.TimeBench,
|
|
|
+ MobileUtils.AppVersion.InstalledVersionNumber + App.DeviceString, resturl);
|
|
|
+ }
|
|
|
+
|
|
|
return TransportStatus.OK;
|
|
|
}
|
|
|
|