Merge pull request #378 from PierreAronnax/patch-1
SparkleListenerTCP: Fixing Reconnect
This commit is contained in:
commit
55f8c89620
|
@ -39,7 +39,6 @@ namespace SparkleLib {
|
||||||
base (server, folder_identifier)
|
base (server, folder_identifier)
|
||||||
{
|
{
|
||||||
base.channels.Add (folder_identifier);
|
base.channels.Add (folder_identifier);
|
||||||
this.socket = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
|
||||||
this.connected = false;
|
this.connected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,9 +69,11 @@ namespace SparkleLib {
|
||||||
// Connect and subscribe to the channel
|
// Connect and subscribe to the channel
|
||||||
int port = Server.Port;
|
int port = Server.Port;
|
||||||
if (port < 0) port = 9999;
|
if (port < 0) port = 9999;
|
||||||
this.socket.Connect (Server.Host, port);
|
|
||||||
|
|
||||||
lock (this.mutex) {
|
lock (this.mutex) {
|
||||||
|
this.socket = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||||
|
this.socket.Connect (Server.Host, port);
|
||||||
|
|
||||||
base.is_connecting = false;
|
base.is_connecting = false;
|
||||||
this.connected = true;
|
this.connected = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue