removed read and write dead lines. Appears to be still working.

This commit is contained in:
Erik Brakkee 2024-07-24 22:26:15 +02:00
parent 78819f1ebe
commit d9f490a2b6
6 changed files with 2 additions and 12 deletions

View File

@ -171,8 +171,6 @@ func main() {
log.Println("WebSocket connection error:", err)
return
}
conn.SetReadDeadline(time.Time{})
conn.SetWriteDeadline(time.Time{})
wsConn := websocketutil.NewWebSocketConn(conn)
defer wsConn.Close()

View File

@ -37,8 +37,6 @@ func handleConnection(conn net.Conn, wsURL string, insecure bool) {
log.Println("WebSocket connection error:", err)
return
}
_wsConn.SetReadDeadline(time.Time{})
_wsConn.SetWriteDeadline(time.Time{})
wsConn := websocketutil.NewWebSocketConn(_wsConn)
defer wsConn.Close()

View File

@ -67,8 +67,6 @@ func main() {
if err != nil {
panic(err)
}
_wsConn.SetReadDeadline(time.Time{})
_wsConn.SetWriteDeadline(time.Time{})
if err != nil {
log.Println("WebSocket connection error:", err)
panic(err)

View File

@ -51,7 +51,8 @@ func NewCommChannel(role Role, wsConn io.ReadWriteCloser) (CommChannel, error) {
panic(fmt.Errorf("Undefined role %d", role))
}
// communication from Agent to ConvergeServer
// communication between Agent and ConvergeServer
// Currently used only fof communication from Agent to ConvergeServer
switch role {
case Agent:

View File

@ -72,8 +72,6 @@ func ConnectWebSocket(conn net.Conn, urlStr string) (net.Conn, error) {
if err != nil {
return nil, err
}
wsConn.SetReadDeadline(time.Time{})
wsConn.SetWriteDeadline(time.Time{})
return NewWebSocketConn(wsConn), nil
}

View File

@ -5,7 +5,6 @@ import (
"log"
"net"
"net/http"
"time"
)
type WebSocketAddr string
@ -29,8 +28,6 @@ func handleWebSocket(w http.ResponseWriter, r *http.Request,
log.Println("Error upgrading to WebSocket:", err)
return
}
conn.SetReadDeadline(time.Time{})
conn.SetWriteDeadline(time.Time{})
wsConn := NewWebSocketConn(conn)
defer wsConn.Close()