commit | a9848d761816731a4ac509b379ea807960e74786 | [log] [tgz] |
---|---|---|
author | Mark Slee <mcslee@apache.org> | 周三 2月 21 04:54:05 2007 +0000 |
committer | Mark Slee <mcslee@apache.org> | 周三 2月 21 04:54:05 2007 +0000 |
tree | d47cc6c5f01ed2a976bc603a1a757bf5ab581a11 | |
parent | 5e0465738e719ce87ae445843eb42324c482b7b1 [diff] [blame] |
New thrift c++ error code Summary: ALREADY_OPEN Reviewed By: aditya git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665010 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/transport/TSocket.cpp b/lib/cpp/src/transport/TSocket.cpp index 58bb9f4..05fb35f 100644 --- a/lib/cpp/src/transport/TSocket.cpp +++ b/lib/cpp/src/transport/TSocket.cpp
@@ -98,6 +98,10 @@ } void TSocket::open() { + if (isOpen()) { + throw TTransportException(TTransportException::ALREADY_OPEN); + } + // Create socket socket_ = socket(AF_INET, SOCK_STREAM, 0); if (socket_ == -1) {