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)
|
Left e -> return (Left e)
|
||||||
Right myrole -> sendpkt rolePkt myrole $
|
Right myrole -> sendpkt rolePkt myrole $
|
||||||
sendpkt versionPkt (Version "2") $ do
|
sendpkt versionPkt (Version "2") $ do
|
||||||
hFlush output
|
sendflush
|
||||||
exchangecaps $ \mycaps -> return $
|
exchangecaps $ \mycaps -> return $
|
||||||
Right (myrole, mycaps)
|
Right (myrole, mycaps)
|
||||||
where
|
where
|
||||||
|
@ -91,9 +91,12 @@ handshake selectrole selectcapability input output =
|
||||||
Nothing -> return $ Left $
|
Nothing -> return $ Left $
|
||||||
"failed constructing pkt-line packet for: " ++ show v
|
"failed constructing pkt-line packet for: " ++ show v
|
||||||
|
|
||||||
sendpkts _ [] cnt = do
|
sendflush = do
|
||||||
writePktLine output flushPkt
|
writePktLine output flushPkt
|
||||||
hFlush output
|
hFlush output
|
||||||
|
|
||||||
|
sendpkts _ [] cnt = do
|
||||||
|
sendflush
|
||||||
cnt
|
cnt
|
||||||
sendpkts f (v:vs) cnt = sendpkt f v $ sendpkts f vs cnt
|
sendpkts f (v:vs) cnt = sendpkt f v $ sendpkts f vs cnt
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue