Browse Source

server: use cmn.ProtocolAndAddress

pull/1780/head
Ethan Buchman 7 years ago
parent
commit
6c41ec65bc
2 changed files with 2 additions and 6 deletions
  1. +1
    -3
      server/grpc_server.go
  2. +1
    -3
      server/socket_server.go

+ 1
- 3
server/grpc_server.go View File

@ -2,7 +2,6 @@ package server
import (
"net"
"strings"
"google.golang.org/grpc"
@ -23,8 +22,7 @@ type GRPCServer struct {
// NewGRPCServer returns a new gRPC ABCI server
func NewGRPCServer(protoAddr string, app types.ABCIApplicationServer) cmn.Service {
parts := strings.SplitN(protoAddr, "://", 2)
proto, addr := parts[0], parts[1]
proto, addr := cmn.ProtocolAndAddress(protoAddr)
s := &GRPCServer{
proto: proto,
addr: addr,


+ 1
- 3
server/socket_server.go View File

@ -5,7 +5,6 @@ import (
"fmt"
"io"
"net"
"strings"
"sync"
"github.com/tendermint/abci/types"
@ -30,8 +29,7 @@ type SocketServer struct {
}
func NewSocketServer(protoAddr string, app types.Application) cmn.Service {
parts := strings.SplitN(protoAddr, "://", 2)
proto, addr := parts[0], parts[1]
proto, addr := cmn.ProtocolAndAddress(protoAddr)
s := &SocketServer{
proto: proto,
addr: addr,


Loading…
Cancel
Save