Skip to content

Commit

Permalink
Fix some docs, and fix a race in web socket wrapper regarding retry f…
Browse files Browse the repository at this point in the history
…or auth
  • Loading branch information
borrrden committed Jun 13, 2017
1 parent dd69276 commit 1cf666c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 13 deletions.
7 changes: 5 additions & 2 deletions docs/Couchbase.shfbproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<Language>en-US</Language>
<DocumentationSources>
<DocumentationSource sourceFile="..\src\Couchbase.Lite\bin\Packaging\netstandard1.4\Couchbase.Lite.dll" />
<DocumentationSource sourceFile="..\src\Couchbase.Lite\bin\Packaging\netstandard1.4\Couchbase.Lite.xml" />
</DocumentationSources>
<DocumentationSource sourceFile="..\src\Couchbase.Lite\bin\Packaging\netstandard1.4\Couchbase.Lite.xml" />
<DocumentationSource sourceFile="C:\Users\borrrden\.nuget\packages\system.runtime\4.3.0\ref\netstandard1.3\System.Runtime.xml" /></DocumentationSources>
<HelpFileVersion>2.0.0.0</HelpFileVersion>
<MaximumGroupParts>2</MaximumGroupParts>
<NamespaceGrouping>False</NamespaceGrouping>
Expand Down Expand Up @@ -77,6 +77,9 @@
<Reference Include="Remotion.Linq">
<HintPath>C:\Users\borrrden\.nuget\packages\Remotion.Linq\2.1.1\lib\netstandard1.0\Remotion.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Net.NetworkInformation">
<HintPath>C:\Users\borrrden\.nuget\packages\system.net.networkinformation\4.3.0\ref\netstandard1.3\System.Net.NetworkInformation.dll</HintPath>
</Reference>
<Reference Include="System.Net.WebSockets">
<HintPath>C:\Users\borrrden\.nuget\packages\system.net.websockets\4.3.0\ref\netstandard1.3\System.Net.WebSockets.dll</HintPath>
</Reference>
Expand Down
7 changes: 7 additions & 0 deletions packaging/nuget/couchbase-lite.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
<tags>couchbase couchbase-mobile couchbase-lite sync database mobile netcore xamarin ios android windows linux mac osx nosql</tags>
<language>en-US</language>
<dependencies>
<group targetFramework="netstandard1.4">
<dependency id="Newtonsoft.Json" version="9.0.1" />
<dependency id="Remotion.Linq" version="2.1.1" />
<dependency id="NETStandard.Library" version="1.6.0" />
<dependency id="System.Security.Cryptography.Algorithms" version="4.3.0" />
<dependency id="System.Net.NetworkInformation" version="4.3.0" />
</group>
<group targetFramework="netcoreapp1.0">
<dependency id="Newtonsoft.Json" version="9.0.1" />
<dependency id="Remotion.Linq" version="2.1.1" />
Expand Down
5 changes: 3 additions & 2 deletions src/Couchbase.Lite/API/DI/ISslStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ public interface ISslStreamFactory : IInjectable
#region Public Methods

/// <summary>
/// Creates a stream for writing TLS encrypted data over TCP
/// Creates a stream for reading and writing
/// TLS encrypted data over TCP
/// </summary>
/// <param name="inner">The underlying </param>
/// <returns></returns>
/// <returns>The instantiated stream ready for communication</returns>
ISslStream Create(Stream inner);

#endregion
Expand Down
19 changes: 10 additions & 9 deletions src/Couchbase.Lite/Sync/WebSocketWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,18 @@ public void CompletedReceive(ulong byteCount)

public unsafe void Start()
{
if (_client != null) {
return;
}

_client = new TcpClient(AddressFamily.InterNetwork | AddressFamily.InterNetworkV6) {
SendTimeout = (int)IdleTimeout.TotalMilliseconds,
ReceiveTimeout = (int) IdleTimeout.TotalMilliseconds
};

_queue.DispatchAsync(() =>
{
if (_client != null) {
return;
}

_client = new TcpClient(AddressFamily.InterNetwork | AddressFamily.InterNetworkV6)
{
SendTimeout = (int)IdleTimeout.TotalMilliseconds,
ReceiveTimeout = (int)IdleTimeout.TotalMilliseconds
};

var cts = new CancellationTokenSource();
cts.CancelAfter(ConnectTimeout);
_client.ConnectAsync(_logic.UrlRequest.Host, _logic.UrlRequest.Port).ContinueWith(t =>
Expand Down

0 comments on commit 1cf666c

Please sign in to comment.