mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Java: Add shutdown method to NetworkTable.
This commit is contained in:
@@ -44,6 +44,20 @@ public class NetworkTable implements ITable, IRemote {
|
||||
running = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* shuts down network tables
|
||||
*/
|
||||
public synchronized static void shutdown() {
|
||||
if (!running)
|
||||
throw new IllegalStateException(
|
||||
"Network tables has not yet been initialized");
|
||||
if (client)
|
||||
NetworkTablesJNI.stopClient();
|
||||
else
|
||||
NetworkTablesJNI.stopServer();
|
||||
running = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* set that network tables should be a server
|
||||
* This must be called before initalize or getTable
|
||||
|
||||
Reference in New Issue
Block a user