(connection *websocket.Conn, done chan struct{})
| 137 | } |
| 138 | |
| 139 | func handleConnection(connection *websocket.Conn, done chan struct{}) { |
| 140 | routines.RunWithPanicHandler(func() { |
| 141 | defer close(done) |
| 142 | for { |
| 143 | _, message, err := connection.ReadMessage() |
| 144 | if err != nil { |
| 145 | exit.Error(ErrorOperatorSocketRead(err)) |
| 146 | } |
| 147 | fmt.Print(string(message)) |
| 148 | } |
| 149 | }, false) |
| 150 | } |
| 151 | |
| 152 | func closeConnection(connection *websocket.Conn, done chan struct{}, interrupt chan os.Signal) { |
| 153 | for { |
no test coverage detected