Skip to content

Commit 965dcfe

Browse files
committed
无法在不断开连接的情况下重连, 跟桑老师已沟通。
1 parent cc82ca0 commit 965dcfe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/IoTSharp.Data.Taos/Protocols/TDWebSocket/TaosWebSocket.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ internal partial class TaosWebSocket : ITaosProtocol
2323

2424
public bool ChangeDatabase(string databaseName)
2525
{
26+
Close(_builder);
2627
_databaseName = databaseName;
2728
_builder.DataBase = _databaseName;
28-
return _ws_conn(_builder,_ws_client) && _ws_conn(_builder, _schemaless_client);
29+
var result = Open(_builder);
30+
return result;
2931
}
3032

3133
public void Close(TaosConnectionStringBuilder connectionStringBuilder)

0 commit comments

Comments
 (0)