Add RelayFull message

This commit is contained in:
Audrius Butkevicius
2015-11-20 23:42:49 +00:00
parent 92158b0611
commit 9047d56aa0
4 changed files with 73 additions and 0 deletions

View File

@@ -119,6 +119,10 @@ func (c *staticClient) Serve() {
}
c.invitations <- msg
case protocol.RelayFull:
l.Infoln("Disconnected from relay due to it becoming full.")
return
default:
l.Infoln("Relay: protocol error: unexpected message %v", msg)
return
@@ -240,6 +244,9 @@ func (c *staticClient) join() error {
return fmt.Errorf("Incorrect response code %d: %s", msg.Code, msg.Message)
}
case protocol.RelayFull:
return fmt.Errorf("relay full")
default:
return fmt.Errorf("protocol error: expecting response got %v", msg)
}