Skip to content

Commit

Permalink
Merge pull request #18 from ViaQ/jvymazal
Browse files Browse the repository at this point in the history
cleanup before release
  • Loading branch information
jvymazal authored Oct 27, 2017
2 parents a2a5618 + ae951a7 commit 979bbb7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.2.0] - 2017-09-11
### Changed
- Server side - new arguments sequence `(port, callback, host = '0.0.0.0' , tls_context = nil, logger = nil)`
- Improved RELP frame checking
## [Unreleased]

## [0.2.1] - 2017-10-27
### Removed
- Temporarily reverted length checking of RELP frames as it caused connection to break under high loads.

## [0.2.0] - 2017-09-11
### Added
- Changelog
- This repo transferred to ViaQ organization
### Changed
- Server side - new arguments sequence `(port, callback, host = '0.0.0.0' , tls_context = nil, logger = nil)`
- Improved RELP frame checking

## [0.1.1] - 2017-06-23
### Changed
Expand Down
6 changes: 6 additions & 0 deletions lib/relp/relp_protocol.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
module Relp
class RelpProtocol
@@relp_version = '0'
# TODO: check whether this exact line is needed or if we can put in something
# custom to help debugging
@@relp_software = 'librelp,1.2.13,http://librelp.adiscon.com'

def create_frame(txnr, command, message)
Expand Down Expand Up @@ -66,6 +68,10 @@ def extract_message_information(message)
informations = Hash[message.scan(/^(.*)=(.*)$/).map { |(key, value)| [key.to_sym, value] }]
end

# IN PROGRESS!
# TODO: find how exactly relp behaves under high load (batch processing
# and adjust this function accordingly, probably more elaborate logic and
# some dynamic offset corrections will be needed
def check_message_length(frame)
if frame[:command] == "close"
real_length = frame[:message].length
Expand Down

0 comments on commit 979bbb7

Please sign in to comment.