mirror of
https://github.com/Cyclenerd/offline-map-tile-downloader.git
synced 2026-05-30 19:34:54 +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)
|
||||
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.
|
||||
for {
|
||||
|
||||
Reference in New Issue
Block a user