add missing flush-pkt after version
This commit is contained in:
parent
d963d40815
commit
7a1a3ef11f
1 changed files with 5 additions and 2 deletions
|
@ -78,7 +78,7 @@ handshake selectrole selectcapability input output =
|
|||
Left e -> return (Left e)
|
||||
Right myrole -> sendpkt rolePkt myrole $
|
||||
sendpkt versionPkt (Version "2") $ do
|
||||
hFlush output
|
||||
sendflush
|
||||
exchangecaps $ \mycaps -> return $
|
||||
Right (myrole, mycaps)
|
||||
where
|
||||
|
@ -91,9 +91,12 @@ handshake selectrole selectcapability input output =
|
|||
Nothing -> return $ Left $
|
||||
"failed constructing pkt-line packet for: " ++ show v
|
||||
|
||||
sendpkts _ [] cnt = do
|
||||
sendflush = do
|
||||
writePktLine output flushPkt
|
||||
hFlush output
|
||||
|
||||
sendpkts _ [] cnt = do
|
||||
sendflush
|
||||
cnt
|
||||
sendpkts f (v:vs) cnt = sendpkt f v $ sendpkts f vs cnt
|
||||
|
||||
|
|
Loading…
Reference in a new issue