watchtower/wtserver/server: handle missed err case from read msg
This commit is contained in:
parent
4a2fb1b4d0
commit
45cfa65b47
@ -191,6 +191,12 @@ func (s *Server) handleClient(peer Peer) {
|
||||
defer s.removePeer(&id, peer.RemoteAddr())
|
||||
|
||||
msg, err := s.readMessage(peer)
|
||||
if err != nil {
|
||||
log.Errorf("Unable to read message from client %s@%s: %v",
|
||||
id, peer.RemoteAddr(), err)
|
||||
return
|
||||
}
|
||||
|
||||
remoteInit, ok := msg.(*wtwire.Init)
|
||||
if !ok {
|
||||
log.Errorf("Client %s@%s did not send Init msg as first "+
|
||||
|
Loading…
Reference in New Issue
Block a user