summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/MainlineDHT.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-10-12 05:41:09 -0400
committerjoe <joe@jerkface.net>2017-10-12 05:41:09 -0400
commit37a7fa4978f89072d9231bcc9bd0848bb52c676c (patch)
tree48a2a934e5da1c6754915d5ad27417f604cbfd04 /src/Network/BitTorrent/MainlineDHT.hs
parent3024b35b05d7f520666af20ced8d1f3080837bb2 (diff)
WIP Onion routing.
Diffstat (limited to 'src/Network/BitTorrent/MainlineDHT.hs')
-rw-r--r--src/Network/BitTorrent/MainlineDHT.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Network/BitTorrent/MainlineDHT.hs b/src/Network/BitTorrent/MainlineDHT.hs
index 4566471a..f4ce4019 100644
--- a/src/Network/BitTorrent/MainlineDHT.hs
+++ b/src/Network/BitTorrent/MainlineDHT.hs
@@ -584,7 +584,7 @@ newClient swarms addr = do
584 gen cnt = (TransactionId $ S.encode cnt, cnt+1) 584 gen cnt = (TransactionId $ S.encode cnt, cnt+1)
585 585
586 client = Client 586 client = Client
587 { clientNet = addHandler (handleMessage client) net 587 { clientNet = addHandler ignoreErrors (handleMessage client) net
588 , clientDispatcher = dispatch 588 , clientDispatcher = dispatch
589 , clientErrorReporter = ignoreErrors -- printErrors stderr 589 , clientErrorReporter = ignoreErrors -- printErrors stderr
590 , clientPending = map_var 590 , clientPending = map_var
@@ -1002,7 +1002,7 @@ mainlineSend meth unwrap msg client nid addr = do
1002 return $ join $ either (const Nothing) Just <$> reply 1002 return $ join $ either (const Nothing) Just <$> reply
1003 where 1003 where
1004 serializer = MethodSerializer 1004 serializer = MethodSerializer
1005 { methodTimeout = 5 1005 { methodTimeout = \_ ni -> return (ni, 5000000)
1006 , method = meth 1006 , method = meth
1007 , wrapQuery = encodeQueryPayload meth (isReadonlyClient client) 1007 , wrapQuery = encodeQueryPayload meth (isReadonlyClient client)
1008 , unwrapResponse = (>>= either (Left . Error GenericError . C8.pack) 1008 , unwrapResponse = (>>= either (Left . Error GenericError . C8.pack)