Skip to content

Commit f28f6a7

Browse files
committed
Allow warning to be returned at same time as conn - #72
1 parent 1ee64dc commit f28f6a7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mqjms/ConnectionFactoryImpl.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func (cf ConnectionFactoryImpl) CreateContextWithSessionMode(sessionMode int, mq
144144
// queue manager.
145145
qMgr, err := ibmmq.Connx(cf.QMName, cno)
146146

147-
if err == nil {
147+
if (qMgr != ibmmq.MQQueueManager{}) {
148148

149149
// Initialize the countInc value to 1 so that if CheckCount is enabled (>0)
150150
// then an error check will be made after the first message - to catch any
@@ -163,7 +163,9 @@ func (cf ConnectionFactoryImpl) CreateContextWithSessionMode(sessionMode int, mq
163163
sendCheckCountInc: countInc,
164164
}
165165

166-
} else {
166+
}
167+
168+
if err != nil {
167169

168170
// The underlying MQI call returned an error, so extract the relevant
169171
// details and pass it back to the caller as a JMSException

0 commit comments

Comments
 (0)