- add comments

- avoid double closing messages
- add cleanup routine for relay manager
This commit is contained in:
Zoltan Papp
2024-06-04 14:40:35 +02:00
parent 15818b72c6
commit a40d4d2f32
5 changed files with 172 additions and 39 deletions

View File

@@ -79,6 +79,7 @@ func (c *Conn) Close() error {
return c.Conn.Close(websocket.StatusNormalClosure, "")
}
// todo: fix io.EOF handling
func ioErrHandling(err error) error {
var wErr *websocket.CloseError
if !errors.As(err, &wErr) {

View File

@@ -18,7 +18,6 @@ import (
// Server
// todo:
// authentication: provide JWT token via RPC call. The MGM server can forward the token to the agents.
// connection timeout handling
type Server struct {
store *Store