Skip to content

Commit

Permalink
Fix error handler in a test
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcnunes committed Aug 30, 2018
1 parent a5e4037 commit 12bcef7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ func (s *Server) Start() (err error) {

addr := net.JoinHostPort(s.conn.Host, strconv.Itoa(s.conn.Port))
s.listener, err = net.Listen(s.conn.Type, addr)
if err != nil {
return err
}

if s.conn.Scheme == "http" {
s.server = &httptest.Server{
Expand All @@ -40,7 +43,7 @@ func (s *Server) Start() (err error) {

s.server.Start()
}
return err
return nil
}

func (s *Server) Close() (err error) {
Expand Down

0 comments on commit 12bcef7

Please sign in to comment.