Compare commits

..

No commits in common. "77cfcce5df2359ccfc1f74254466e974d55cf454" and "a69a9385b6694db965fd35d6b2a11ba792f9e41f" have entirely different histories.

4 changed files with 5 additions and 8 deletions

View File

@ -1,6 +1,3 @@
# Changelog for gemcap
## 0.1.0.1
- updated underlying libraries to more current versions
- fixed a bug that would cause the server to crash when the client aborted the handshake by rejecting the key
## Unreleased changes

View File

@ -5,7 +5,7 @@ cabal-version: 2.2
-- see: https://github.com/sol/hpack
name: gemcap
version: 0.1.0.1
version: 0.1.0
synopsis: a simple Gemini capsule (server)
description: a simple Gemini capsule (server) - see README.md for details
category: Gemini

View File

@ -1,5 +1,5 @@
name: gemcap
version: 0.1.0.1
version: 0.1.0
license: AGPL-3.0-or-later
author: "Jonathan Lamothe"
maintainer: "jonathan@jlamothe.net"

View File

@ -31,7 +31,7 @@ module Network.Gemini.Capsule (
) where
import Control.Concurrent (forkIO)
import Control.Exception (SomeException, try)
import Control.Exception (IOException, try)
import Control.Exception.Base (bracket, finally)
import Control.Monad (void)
import qualified Data.Connection as C
@ -72,7 +72,7 @@ listenLoop sock params handler = do
certRef <- newIORef Nothing
let params' = adjustServerParams certRef params
try (accept params' sock) >>= \case
Left (_::SomeException) -> return ()
Left (_::IOException) -> return ()
Right conn -> void $ forkIO $ finally
(readIORef certRef >>= runConnection conn handler)
(C.close conn)