mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
adjust reading ip address
adjust reading ip address
This commit is contained in:
parent
4c8367a8b3
commit
62074c7653
|
@ -46,7 +46,7 @@ func (ms *MasterServer) dirJoinHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if *joinMessage.Ip == "" {
|
if *joinMessage.Ip == "" {
|
||||||
*joinMessage.Ip = r.RemoteAddr[0:strings.Index(r.RemoteAddr, ":")]
|
*joinMessage.Ip = r.RemoteAddr[0:strings.LastIndex(r.RemoteAddr, ":")]
|
||||||
}
|
}
|
||||||
if glog.V(4) {
|
if glog.V(4) {
|
||||||
if jsonData, jsonError := json.Marshal(joinMessage); jsonError != nil {
|
if jsonData, jsonError := json.Marshal(joinMessage); jsonError != nil {
|
||||||
|
|
Loading…
Reference in a new issue