mirror of
https://github.com/sigcn/pg.git
synced 2025-10-05 18:36:50 +08:00
@@ -218,6 +218,9 @@ func (c *WSConn) dial(ctx context.Context, server string) error {
|
|||||||
if httpResp != nil && httpResp.StatusCode == http.StatusBadRequest {
|
if httpResp != nil && httpResp.StatusCode == http.StatusBadRequest {
|
||||||
return fmt.Errorf("address: %s is already in used", c.peerID)
|
return fmt.Errorf("address: %s is already in used", c.peerID)
|
||||||
}
|
}
|
||||||
|
if httpResp != nil && httpResp.StatusCode == http.StatusNotFound {
|
||||||
|
return fmt.Errorf("dial server %s: 404 not found", server)
|
||||||
|
}
|
||||||
if httpResp != nil && httpResp.StatusCode == http.StatusForbidden {
|
if httpResp != nil && httpResp.StatusCode == http.StatusForbidden {
|
||||||
var err disco.Error
|
var err disco.Error
|
||||||
json.NewDecoder(httpResp.Body).Decode(&err)
|
json.NewDecoder(httpResp.Body).Decode(&err)
|
||||||
|
Reference in New Issue
Block a user