[Bugfix] allow pending data to send before exit (#98)

5 files changed