Skip to content

Commit

Permalink
Optimize error text
Browse files Browse the repository at this point in the history
  • Loading branch information
andeya committed Jan 4, 2018
1 parent ce0a3c4 commit 557ce81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func (p *Peer) Listen(protoFunc ...socket.ProtoFunc) error {
func (p *Peer) ServeConn(conn net.Conn, protoFunc ...socket.ProtoFunc) (Session, error) {
network := conn.LocalAddr().Network()
if strings.Contains(network, "udp") {
return nil, fmt.Errorf("Invalid network: %s,\nrefer to the following: tcp, tcp4, tcp6, unix or unixpacket", network)
return nil, fmt.Errorf("invalid network: %s,\nrefer to the following: tcp, tcp4, tcp6, unix or unixpacket", network)
}
if c, ok := conn.(*tls.Conn); ok {
if p.defaultReadTimeout > 0 {
Expand Down

0 comments on commit 557ce81

Please sign in to comment.