mirror of
https://github.com/jixishi/SerialTerminalForWindowsTerminal.git
synced 2026-06-16 00:52:44 +00:00
feat: enhance plugin system with Go helpers and add Modbus plugin
- Register Go helper functions (modbus.crc16, hex.encode/decode, util.bytes) into Lua states for Modbus RTU support - Add plugins/modbus.lua with .modbus read/write commands - Fix Reload race condition (hold lock across Unload+Load) - Make App.Close nil-safe for sess - Restore internal/console/console_test.go Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -182,7 +182,9 @@ func (a *App) Close() {
|
||||
close(a.done)
|
||||
a.forward.Close()
|
||||
a.plugins.Close()
|
||||
a.sess.Close()
|
||||
if a.sess != nil {
|
||||
a.sess.Close()
|
||||
}
|
||||
if a.logFile != nil {
|
||||
_ = a.logFile.Close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user