diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-12-28 22:03:23 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-12-28 22:03:23 +0000 |
commit | 1c1872a295a8f624feda363b9edb366da97798c6 (patch) | |
tree | cbf33eb2ca84250f31c8b134a77b150d48e3d4b8 /lib/server | |
parent | a0e488cdab1907167d2f02a1b88706aea7f44a79 (diff) |
Add missing timeouts on command socket writes.
Diffstat (limited to 'lib/server')
-rw-r--r-- | lib/server/SocketStream.h | 6 | ||||
-rw-r--r-- | lib/server/WinNamedPipeStream.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/server/SocketStream.h b/lib/server/SocketStream.h index 438bd989..fd57af8f 100644 --- a/lib/server/SocketStream.h +++ b/lib/server/SocketStream.h @@ -51,9 +51,9 @@ public: virtual void Write(const void *pBuffer, int NBytes, int Timeout = IOStream::TimeOutInfinite); - // Why not inherited from IOStream? - virtual void Write(const std::string& rBuffer, - int Timeout = IOStream::TimeOutInfinite) + // Why not inherited from IOStream? Never mind, we want to enforce + // supplying a timeout for network operations anyway. + virtual void Write(const std::string& rBuffer, int Timeout) { IOStream::Write(rBuffer, Timeout); } diff --git a/lib/server/WinNamedPipeStream.h b/lib/server/WinNamedPipeStream.h index 60641808..4c8a1e8f 100644 --- a/lib/server/WinNamedPipeStream.h +++ b/lib/server/WinNamedPipeStream.h @@ -45,9 +45,9 @@ public: virtual bool StreamDataLeft(); virtual bool StreamClosed(); - // Why not inherited from IOStream? - virtual void Write(const std::string& rBuffer, - int Timeout = IOStream::TimeOutInfinite) + // Why not inherited from IOStream? Never mind, we want to enforce + // supplying a timeout for network operations anyway. + virtual void Write(const std::string& rBuffer, int Timeout) { IOStream::Write(rBuffer, Timeout); } |