mirror of
https://github.com/Cyclenerd/offline-map-tile-downloader.git
synced 2026-06-01 20:34:55 +02:00
Fix: Error return value of conn.Close is not checked
This commit is contained in:
@@ -170,7 +170,11 @@ func wsHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
log.Println(err)
|
log.Println(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer conn.Close()
|
defer func() {
|
||||||
|
if err := conn.Close(); err != nil {
|
||||||
|
log.Printf("Could not close websocket connection: %v", err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
// Loop to read messages from the WebSocket connection.
|
// Loop to read messages from the WebSocket connection.
|
||||||
for {
|
for {
|
||||||
|
|||||||
Reference in New Issue
Block a user