|
@@ -228,11 +228,11 @@ namespace OHVDriveLogger
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- bool Request( string topic, out string response )
|
|
|
|
|
|
|
+ public bool Request( string topic, out string response )
|
|
|
{
|
|
{
|
|
|
response = string.Empty;
|
|
response = string.Empty;
|
|
|
|
|
|
|
|
- if ( this.IsReqConnected )
|
|
|
|
|
|
|
+ if ( !this.IsReqConnected )
|
|
|
return false;
|
|
return false;
|
|
|
|
|
|
|
|
if ( this.req.HasOut )
|
|
if ( this.req.HasOut )
|
|
@@ -241,7 +241,13 @@ namespace OHVDriveLogger
|
|
|
if ( this.req.TryReceiveFrameString( TimeSpan.FromSeconds( 5 ), out response ) )
|
|
if ( this.req.TryReceiveFrameString( TimeSpan.FromSeconds( 5 ), out response ) )
|
|
|
return true;
|
|
return true;
|
|
|
else
|
|
else
|
|
|
|
|
+ {
|
|
|
|
|
+ this.req.Disconnect( "tcp://127.0.0.1:5567" );
|
|
|
|
|
+
|
|
|
|
|
+ //this.req = new RequestSocket();
|
|
|
|
|
+ this.req.Connect( "tcp://127.0.0.1:5567" );
|
|
|
return false;
|
|
return false;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|