diff options
Diffstat (limited to 'src/Network/BitTorrent')
-rw-r--r-- | src/Network/BitTorrent/Exchange/Message.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Network/BitTorrent/Exchange/Message.hs b/src/Network/BitTorrent/Exchange/Message.hs index 8d0c62f4..e93f8bbe 100644 --- a/src/Network/BitTorrent/Exchange/Message.hs +++ b/src/Network/BitTorrent/Exchange/Message.hs | |||
@@ -679,8 +679,7 @@ instance Default ExtendedHandshake where | |||
679 | 679 | ||
680 | instance Monoid ExtendedHandshake where | 680 | instance Monoid ExtendedHandshake where |
681 | mempty = def { ehsCaps = mempty } | 681 | mempty = def { ehsCaps = mempty } |
682 | mappend old new = | 682 | mappend old new = ExtendedHandshake { |
683 | ExtendedHandshake { | ||
684 | ehsCaps = ehsCaps old <> ehsCaps new, | 683 | ehsCaps = ehsCaps old <> ehsCaps new, |
685 | ehsIPv4 = ehsIPv4 old `mergeOld` ehsIPv4 new, | 684 | ehsIPv4 = ehsIPv4 old `mergeOld` ehsIPv4 new, |
686 | ehsIPv6 = ehsIPv6 old `mergeOld` ehsIPv6 new, | 685 | ehsIPv6 = ehsIPv6 old `mergeOld` ehsIPv6 new, |
@@ -691,8 +690,8 @@ instance Monoid ExtendedHandshake where | |||
691 | ehsYourIp = ehsYourIp old `mergeOld` ehsYourIp new | 690 | ehsYourIp = ehsYourIp old `mergeOld` ehsYourIp new |
692 | } | 691 | } |
693 | where | 692 | where |
694 | mergeOld old new = old <|> new | 693 | mergeOld mold mnew = mold <|> mnew |
695 | mergeNew old new = new <|> old | 694 | mergeNew mold mnew = mnew <|> mold |
696 | 695 | ||
697 | 696 | ||
698 | instance BEncode ExtendedHandshake where | 697 | instance BEncode ExtendedHandshake where |