diff --git a/src/Tunnel.hs b/src/Tunnel.hs index 2b67add..ae33de0 100644 --- a/src/Tunnel.hs +++ b/src/Tunnel.hs @@ -12,7 +12,6 @@ module Tunnel ) where import ClassyPrelude -import Control.Concurrent.Async (race_) import Data.Maybe (fromJust) import qualified Data.ByteString.Char8 as BC @@ -47,11 +46,11 @@ import qualified Credentials rrunTCPClient :: N.ClientSettings -> (Connection -> IO a) -> IO a rrunTCPClient cfg app = bracket (N.getSocketFamilyTCP (N.getHost cfg) (N.getPort cfg) (N.getAddrFamily cfg)) - (\r -> catch (N.sClose $ fst r) (\(_ :: SomeException) -> return ())) + (\r -> catch (N.close $ fst r) (\(_ :: SomeException) -> return ())) (\(s, _) -> app Connection { read = Just <$> N.safeRecv s (N.getReadBufferSize cfg) , write = N.sendAll s - , close = N.sClose s + , close = N.close s , rawConnection = Just s }) @@ -280,3 +279,10 @@ propagateWrites :: Connection -> Connection -> IO () propagateWrites hTunnel hOther = do payload <- fromJust <$> read hOther unless (null payload) (write hTunnel payload >> propagateWrites hTunnel hOther) + + + +toto :: String -> Connection +toto = undefined +toto :: Int -> Connection +toto = undefined diff --git a/stack.yaml b/stack.yaml index 21b242c..b467343 100644 --- a/stack.yaml +++ b/stack.yaml @@ -15,7 +15,7 @@ # resolver: # name: custom-snapshot # location: "./custom-snapshot.yaml" -resolver: nightly-2016-06-12 +resolver: lts-7.0 # User packages to be built. # Various formats can be used as shown in the example below. @@ -63,4 +63,4 @@ extra-package-dbs: [] # extra-lib-dirs: [/path/to/dir] # # Allow a newer minor version of GHC than the snapshot specifies -# compiler-check: newer-minor \ No newline at end of file +# compiler-check: newer-minor