@@ -36,7 +36,7 @@ utf8::upgrade $upgraded;
36
36
my ($server , $client );
37
37
my $promise = Mojo::Promise-> new-> ioloop($loop );
38
38
my $id = $loop -> server(
39
- {address => ' localhost ' , tls => 1} => sub {
39
+ {address => ' 127.0.0.1 ' , tls => 1} => sub {
40
40
my ($loop , $stream ) = @_ ;
41
41
$stream -> write ($upgraded => sub { shift -> write (' 321' ) });
42
42
$stream -> on(close => sub { $promise -> resolve });
@@ -64,7 +64,7 @@ my ($remove, $running, $timeout, $server_err, $server_close, $client_close);
64
64
Mojo::IOLoop-> remove(Mojo::IOLoop-> recurring(0 => sub { $remove ++ }));
65
65
$promise = Mojo::Promise-> new;
66
66
$id = Mojo::IOLoop-> server(
67
- address => ' localhost ' ,
67
+ address => ' 127.0.0.1 ' ,
68
68
tls => 1,
69
69
tls_ca => ' t/mojo/certs/ca.crt' ,
70
70
tls_cert => ' t/mojo/certs/server.crt' ,
@@ -148,7 +148,7 @@ ok $client_err, 'has error';
148
148
$loop = Mojo::IOLoop-> new;
149
149
($server_err , $client_err ) = ();
150
150
$id = $loop -> server(
151
- address => ' localhost ' ,
151
+ address => ' 127.0.0.1 ' ,
152
152
tls => 1,
153
153
tls_ca => ' no cert' ,
154
154
tls_cert => ' t/mojo/certs/server.crt' ,
@@ -176,7 +176,7 @@ ok $client_err, 'has error';
176
176
($client , $client_close ) = ();
177
177
$promise = Mojo::Promise-> new;
178
178
$id = Mojo::IOLoop-> server(
179
- address => ' localhost ' ,
179
+ address => ' 127.0.0.1 ' ,
180
180
tls => 1,
181
181
tls_ca => ' t/mojo/certs/ca.crt' ,
182
182
tls_cert => ' t/mojo/certs/server.crt' ,
@@ -231,7 +231,7 @@ ok !$server_err, 'no error';
231
231
$loop = Mojo::IOLoop-> new;
232
232
($server_err , $client_err ) = ();
233
233
$id = $loop -> server(
234
- address => ' localhost ' ,
234
+ address => ' 127.0.0.1 ' ,
235
235
tls => 1,
236
236
tls_cert => ' t/mojo/certs/bad.crt' ,
237
237
tls_key => ' t/mojo/certs/bad.key' ,
@@ -256,7 +256,7 @@ ok $client_err, 'has error';
256
256
$loop = Mojo::IOLoop-> new;
257
257
($server_err , $client_err ) = ();
258
258
$id = $loop -> server(
259
- address => ' localhost ' ,
259
+ address => ' 127.0.0.1 ' ,
260
260
tls => 1,
261
261
tls_cert => ' t/mojo/certs/bad.crt' ,
262
262
tls_key => ' t/mojo/certs/bad.key' ,
@@ -281,7 +281,7 @@ ok $client_err, 'has error';
281
281
$loop = Mojo::IOLoop-> new;
282
282
($server_err , $client_err ) = ();
283
283
$id = $loop -> server(
284
- address => ' localhost ' ,
284
+ address => ' 127.0.0.1 ' ,
285
285
tls => 1,
286
286
tls_cert => ' t/mojo/certs/bad.crt' ,
287
287
tls_key => ' t/mojo/certs/bad.key' ,
@@ -307,7 +307,7 @@ $loop = Mojo::IOLoop->new;
307
307
my ($cipher , $version );
308
308
($server , $client , $client_err ) = ();
309
309
$id = $loop -> server(
310
- address => ' localhost ' ,
310
+ address => ' 127.0.0.1 ' ,
311
311
tls => 1,
312
312
tls_ca => ' t/mojo/certs/ca.crt' ,
313
313
tls_cert => ' t/mojo/certs/server.crt' ,
@@ -347,7 +347,7 @@ is $cipher, $expect, "$expect has been negotiatied";
347
347
# Ignore missing client certificate
348
348
($server , $client , $client_err ) = ();
349
349
$id = Mojo::IOLoop-> server(
350
- address => ' localhost ' ,
350
+ address => ' 127.0.0.1 ' ,
351
351
tls => 1,
352
352
tls_ca => ' t/mojo/certs/ca.crt' ,
353
353
tls_cert => ' t/mojo/certs/server.crt' ,
@@ -372,7 +372,7 @@ subtest 'ALPN' => sub {
372
372
plan skip_all => ' ALPN support required!' unless IO::Socket::SSL-> can_alpn;
373
373
my ($server_proto , $client_proto );
374
374
$id = Mojo::IOLoop-> server(
375
- address => ' localhost ' ,
375
+ address => ' 127.0.0.1 ' ,
376
376
tls => 1,
377
377
tls_options => {SSL_alpn_protocols => [' foo' , ' bar' , ' baz' ]},
378
378
sub {
0 commit comments