Commit graph

16 commits

Author SHA1 Message Date
Gabriel Gonzalez
d4a80a9a4e Make server process killable
35163c3c18
introduced a new use of `mask` which makes the server process uninterruptible
while waiting for a new incoming request.  This change fixes that by
surrounding the logic that waits for a new request with `unmask`.  This
new `unmask` should still respect the finalization guarantees of the
surrounding masked code.
2020-05-27 16:48:18 -07:00
Moritz Kiefer
4164623844 Don’t free op array values in op_array_destroy (#98)
These values are all already freed in freeOpContext and doing it twice
is an error, see #91
2019-11-21 15:47:55 -08:00
Moritz Kiefer
be70fc49b0 Mask body of runOps to avoid a heap corruption (#89) 2019-08-29 11:15:48 -05:00
Moritz Kiefer
01b17286b6 Free slice in OpSendStatusFromServerContext (#90)
We allocate the slice in createOpContext via byteStringToSlice but we
never freed it.
2019-08-28 09:46:14 -05:00
Moritz Kiefer
11681ec6b9
Fix sdist tarballs (#88)
A bunch of files have been missing from the tarballs created by `cabal
sdist`. I’ve changed the nix config to check for this and also found
some examples that I forgot to update in a previous PR (sorry about
that).
2019-08-28 09:28:26 +02:00
Moritz Kiefer
5ceeae74cc Upgrade to gRPC 1.22 (#85) 2019-08-22 11:12:21 -05:00
Moritz Kiefer
35163c3c18 Fix async exception handling (#86)
Previously, grpc-haskell used a lot of code in the form of

```
do x <- acquireResource
   f x `finally` releaseResource x
```

This is not safe since you can get killed after acquiring the resource
but before installing the exception handler via `finally`. We have
seen various gRPC assertion errors and crashes on shutdown when this
got triggered.
2019-08-22 10:55:33 -05:00
Moritz Kiefer
a26497c82c Expose ClientCall in ClientReaderHandler and ClientRWHandler (#87)
This allows you to cancel the call from within the callback using
`clientCallCancel`.
2019-08-22 10:53:41 -05:00
j6carey
75cf21839b
Port grpc-haskell[-core] to ghc-8.6 and modern tasty. (#77)
Note that even though we can now build grpc-haskell and grpc-haskell-core
with modern tasty, the environment in which we built those test programs
did not support actually running all them successfully, due to the need to test
generated code in the context of the appropriate libraries.  We do not yet
know whether test programs built with new versions of tasty would succeed
in the appropriate environment.  In principle this could be discovered, but
the work involved is far from trivial, and therefore we defer it to another
time.  Tests built with the old tasty still succeed.
2019-03-25 16:52:04 -07:00
intractable
28288a17b7
Client helpers, re-exports, and fixups (#70)
* Derive `Show` instance for `ClientSSLKeyCertPair`

* Add a couple client helper functions & add additional exports

* Add `grpc-haskell-core` target; add `c2hs` dep

* Fix examples broken by #68

* rm `build-tools` and `include-dirs` directives from toplevel `.cabal`

* More `ClientConfig` fixes

* Ensure examples are built
2018-10-14 17:52:59 -05:00
ryan4729
c80269089c fix tests broken by previous commit (#69) 2018-10-09 19:29:29 -05:00
ryan4729
24bdacca3a allow clients to set authority header (#68) 2018-09-24 08:37:05 -07:00
Travis Athougies
991b389a16 Add max metadata size option (#67) 2018-07-27 10:41:18 -05:00
Ewout
9c6b3f63b6 Fix build on GHC 8.4 (#63)
* Fix haddock: postfix comments on GADT constructors don't work.

See https://github.com/haskell/haddock/issues/43 .

* Remove unused dependencies from cabal file..

* Semigroup instances for compatibility with GHC 8.4.
2018-06-18 12:24:19 -07:00
Christian Lavoie
5fd44880da Remove proto3-wire dependency from core package. (#47) 2018-01-30 09:20:05 -08:00
Christian Lavoie
9cfb3da770 Extract lowlevel bits into a core package (#42) 2018-01-29 08:59:34 -08:00