@@ -7,7 +7,7 @@ use std::io;
7
7
use std:: net:: { SocketAddr , ToSocketAddrs } ;
8
8
use std:: time:: { Duration , Instant } ;
9
9
use std:: vec;
10
- use tokio_io:: io:: { flush , read_exact, write_all, Flush , ReadExact , WriteAll } ;
10
+ use tokio_io:: io:: { read_exact, write_all, ReadExact , WriteAll } ;
11
11
use tokio_tcp:: { self , TcpStream } ;
12
12
use tokio_timer:: Delay ;
13
13
@@ -61,20 +61,13 @@ pub enum Connect {
61
61
params : ConnectParams ,
62
62
tls : TlsMode ,
63
63
} ,
64
- #[ state_machine_future( transitions( FlushingSsl ) ) ]
64
+ #[ state_machine_future( transitions( ReadingSsl ) ) ]
65
65
SendingSsl {
66
66
future : WriteAll < Socket , Vec < u8 > > ,
67
67
params : ConnectParams ,
68
68
connector : Box < TlsConnect > ,
69
69
required : bool ,
70
70
} ,
71
- #[ state_machine_future( transitions( ReadingSsl ) ) ]
72
- FlushingSsl {
73
- future : Flush < Socket > ,
74
- params : ConnectParams ,
75
- connector : Box < TlsConnect > ,
76
- required : bool ,
77
- } ,
78
71
#[ state_machine_future( transitions( ConnectingTls , Ready ) ) ]
79
72
ReadingSsl {
80
73
future : ReadExact < Socket , [ u8 ; 1 ] > ,
@@ -240,19 +233,6 @@ impl PollConnect for Connect {
240
233
) -> Poll < AfterSendingSsl , Error > {
241
234
let ( stream, _) = try_ready_closed ! ( state. future. poll( ) ) ;
242
235
let state = state. take ( ) ;
243
- transition ! ( FlushingSsl {
244
- future: flush( stream) ,
245
- params: state. params,
246
- connector: state. connector,
247
- required: state. required,
248
- } )
249
- }
250
-
251
- fn poll_flushing_ssl < ' a > (
252
- state : & ' a mut RentToOwn < ' a , FlushingSsl > ,
253
- ) -> Poll < AfterFlushingSsl , Error > {
254
- let stream = try_ready_closed ! ( state. future. poll( ) ) ;
255
- let state = state. take ( ) ;
256
236
transition ! ( ReadingSsl {
257
237
future: read_exact( stream, [ 0 ] ) ,
258
238
params: state. params,
0 commit comments