[FIX] fix null node cause panic

This commit is contained in:
bay1ts 2017-11-28 18:21:03 +08:00
parent b1a4406d0d
commit dd9f56c9e0

View File

@ -258,7 +258,7 @@ func HandleTaskStatus(task string) (*TaskStatus,error) {
} }
func (r *RNodeServer)Request(url ,method string, body []byte) ([]byte,int,error) { func (r *RNodeServer)Request(url ,method string, body []byte) ([]byte,int,error) {
//logrus.Infof("requesting url: %s by method :%s,and body is ",r.NodeAPI+url,method,string(body)) //logrus.Infof("requesting url: %s by method :%s,and body is ",r.NodeAPI+url,method,string(body))
request, err := http.NewRequest(method, r.NodeAPI+url, bytes.NewBuffer(body)) request, err := http.NewRequest(method, "http://localhost:6100/v2"+url, bytes.NewBuffer(body))
if err != nil { if err != nil {
return nil,500,err return nil,500,err
} }