From: Diogo Franco (Kovensky) Date: Tue, 16 Jul 2013 17:01:34 +0000 (-0300) Subject: anidb: Handle UDP API 601 (server down) X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=9f5048c7236deee49b0ae0104a7f54ab7e62a1c4;p=go-anidb.git anidb: Handle UDP API 601 (server down) We treat it the same as a ban: wait 30 minutes before allowing any packets through. --- diff --git a/udp.go b/udp.go index ec8f83d..3c47da0 100644 --- a/udp.go +++ b/udp.go @@ -149,7 +149,9 @@ func (udp *udpWrap) sendQueue() { } case 503, 504: // client library rejected panic(reply.Error()) - case 555: // IP (and user, possibly client) temporarily banned + // 555: IP (and user, possibly client) temporarily banned + // 601: Server down (treat the same as a ban) + case 555, 601: setBanned() } set.ch <- reply