diff --git a/src/remote/codec.cpp b/src/remote/codec.cpp index 6e4cb4f..f50ffbc 100644 --- a/src/remote/codec.cpp +++ b/src/remote/codec.cpp @@ -1060,7 +1060,7 @@ void BlockingTCPTransportCodec::waitJoin() void BlockingTCPTransportCodec::internalClose(bool /*force*/) { - if(_channel != INVALID_SOCKET) { + { epicsSocketSystemCallInterruptMechanismQueryInfo info = epicsSocketSystemCallInterruptMechanismQuery (); @@ -1090,8 +1090,6 @@ void BlockingTCPTransportCodec::internalClose(bool /*force*/) default: epicsSocketDestroy(_channel); } - - _channel = INVALID_SOCKET; //TODO: mutex to guard _channel } Transport::shared_pointer thisSharedPtr = this->shared_from_this(); diff --git a/src/remote/pv/codec.h b/src/remote/pv/codec.h index 5b75baa..92c5017 100644 --- a/src/remote/pv/codec.h +++ b/src/remote/pv/codec.h @@ -466,8 +466,8 @@ private: AtomicValue _isOpen; epics::pvData::Thread _readThread, _sendThread; epics::pvData::Event _shutdownEvent; + const SOCKET _channel; protected: - SOCKET _channel; osiSockAddr _socketAddress; std::string _socketName; protected: