Skip to content

Commit f34420d

Browse files
committed
[refactoring] Improve error handling
1 parent fc16056 commit f34420d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/app/controller/uiServer.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ func (a *ApiServer) PublishUiProtocol(protocol []UiProtocolEntry) {
8989
}
9090

9191
func (a *ApiServer) disconnect(conn *websocket.Conn) {
92-
conn.Close()
92+
err := conn.Close()
93+
if err != nil {
94+
log.Println("Could not disconnect from websocket conn: ", err)
95+
}
9396
for i, c := range a.connections {
9497
if c == conn {
9598
a.connections = append(a.connections[:i], a.connections[i+1:]...)

0 commit comments

Comments
 (0)