diff options
author | Julian Andres Klode <jak@debian.org> | 2017-06-28 13:20:54 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2017-06-28 15:52:38 +0200 |
commit | f806530b9ea858ca6bda8fb8f43d988aba02dab3 (patch) | |
tree | 23d237b5912c43ff6926c7d7d8e2f134cc90f4b4 /methods/connect.h | |
parent | 0fe2161020d6e331639ed11872a947dd20035890 (diff) |
methods: http: Drain pending data before selecting
GnuTLS can already have data pending in its buffers, we need
to to drain that first otherwise select() might block
indefinitely.
Gbp-Dch: ignore
Diffstat (limited to 'methods/connect.h')
-rw-r--r-- | methods/connect.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/methods/connect.h b/methods/connect.h index 39f3c1ce2..4456d660d 100644 --- a/methods/connect.h +++ b/methods/connect.h @@ -35,6 +35,8 @@ struct MethodFd virtual ~MethodFd(){}; /// \brief Construct a MethodFd from a UNIX file descriptor static std::unique_ptr<MethodFd> FromFd(int iFd); + /// \brief If there is pending data. + virtual bool HasPending(); }; bool Connect(std::string To, int Port, const char *Service, int DefPort, |