File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
projects/client/RabbitMQ.Client/src/client/impl Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -156,10 +156,20 @@ public void SendHeader()
156
156
lock ( m_writer )
157
157
{
158
158
m_writer . Write ( Encoding . ASCII . GetBytes ( "AMQP" ) ) ;
159
- m_writer . Write ( ( byte ) 1 ) ;
160
- m_writer . Write ( ( byte ) 1 ) ;
161
- m_writer . Write ( ( byte ) m_endpoint . Protocol . MajorVersion ) ;
162
- m_writer . Write ( ( byte ) m_endpoint . Protocol . MinorVersion ) ;
159
+ if ( m_endpoint . Protocol . Revision != 0 )
160
+ {
161
+ m_writer . Write ( ( byte ) 0 ) ;
162
+ m_writer . Write ( ( byte ) m_endpoint . Protocol . MajorVersion ) ;
163
+ m_writer . Write ( ( byte ) m_endpoint . Protocol . MinorVersion ) ;
164
+ m_writer . Write ( ( byte ) m_endpoint . Protocol . Revision ) ;
165
+ }
166
+ else
167
+ {
168
+ m_writer . Write ( ( byte ) 1 ) ;
169
+ m_writer . Write ( ( byte ) 1 ) ;
170
+ m_writer . Write ( ( byte ) m_endpoint . Protocol . MajorVersion ) ;
171
+ m_writer . Write ( ( byte ) m_endpoint . Protocol . MinorVersion ) ;
172
+ }
163
173
m_writer . Flush ( ) ;
164
174
}
165
175
}
You can’t perform that action at this time.
0 commit comments