Limit session-based JSON RPC service to IPv4.
Client not ready for IPv6.
This commit is contained in:
parent
90b641c86c
commit
22a50ad085
1 changed files with 3 additions and 3 deletions
|
@ -54,13 +54,13 @@ func (cr *gorillaRpcCodecRequest) Method() (string, error) {
|
||||||
func (s *Server) StartJsonRPC() error {
|
func (s *Server) StartJsonRPC() error {
|
||||||
// Set up the pure JSONRPC server with persistent connections/sessions.
|
// Set up the pure JSONRPC server with persistent connections/sessions.
|
||||||
if s.Args.JSONRPCPort != 0 {
|
if s.Args.JSONRPCPort != 0 {
|
||||||
port := ":" + strconv.FormatUint(uint64(s.Args.JSONRPCPort), 10)
|
port := ":" + strconv.Itoa(s.Args.JSONRPCPort)
|
||||||
laddr, err := net.ResolveTCPAddr("tcp", port)
|
laddr, err := net.ResolveTCPAddr("tcp4", port)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("ResoveIPAddr: %v\n", err)
|
log.Errorf("ResoveIPAddr: %v\n", err)
|
||||||
goto fail1
|
goto fail1
|
||||||
}
|
}
|
||||||
listener, err := net.ListenTCP("tcp", laddr)
|
listener, err := net.ListenTCP("tcp4", laddr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("ListenTCP: %v\n", err)
|
log.Errorf("ListenTCP: %v\n", err)
|
||||||
goto fail1
|
goto fail1
|
||||||
|
|
Loading…
Reference in a new issue